-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Major Update: • Enhanced the color system for easier updates. • Updated stories to reflect how changes to existing color variables are applied to components. Bug Fix: • Resolved an issue where button loading colors were not being properly injected. ## Test Plan See included stories in `Button` and `Typography` with `Custom` prefix. ## Tests N/A ## Checklist Before you create this PR confirms that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). This will ensure a smooth and quick review process. - [x] I read the [Contributor Guide](https://github.com/crossplatformkorea/cpk-ui/blob/main/CONTRIBUTING.md) and followed the process outlined there for submitting PRs. - [x] Run `yarn test:all` and make sure nothing fails. - [x] I am willing to follow-up on review comments in a timely manner.
- Loading branch information
Showing
13 changed files
with
287 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
## Changelogs | ||
|
||
Covered in [release notes](https://github.com/crossplatformkorea/CPK-UI/releases). | ||
Covered in [release notes](https://github.com/crossplatformkorea/cpk-ui/releases). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# CPK-UI | ||
# cpk-ui | ||
|
||
React Native UI components for [Expo](https://expo.dev). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import type {Meta, StoryObj} from '@storybook/react'; | ||
import {Typography} from './Typography'; | ||
import {withThemeProvider} from '../../../../.storybook/decorators'; | ||
import {ScrollView, View} from 'react-native'; | ||
import {ThemeParam} from '../../../utils/theme'; | ||
|
||
const meta = { | ||
title: 'Typography', | ||
component: Typography.Title, | ||
decorators: [ | ||
(Story, context) => | ||
withThemeProvider( | ||
Story, | ||
context, | ||
(context.args.theme as any) || undefined, | ||
), | ||
], | ||
} satisfies Meta<typeof Typography.Title>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const AllTypography: Story = { | ||
render: (args) => ( | ||
<ScrollView contentContainerStyle={{padding: 16}}> | ||
{Object.entries(Typography).map(([key, Component]) => ( | ||
<View key={key} style={{marginBottom: 16}}> | ||
<Component {...args}> | ||
{key} {args.children} | ||
</Component> | ||
</View> | ||
))} | ||
</ScrollView> | ||
), | ||
args: { | ||
children: 'Hello world', | ||
}, | ||
}; | ||
|
||
export const CustomTitle: Story = { | ||
args: { | ||
children: 'Custom Color', | ||
// @ts-ignore | ||
theme: { | ||
light: { | ||
text: { | ||
basic: 'blue', | ||
}, | ||
}, | ||
dark: { | ||
text: { | ||
basic: 'skyblue', | ||
}, | ||
}, | ||
} as ThemeParam, | ||
}, | ||
}; |
Oops, something went wrong.