Skip to content

Commit

Permalink
Merge pull request #192 from ZeroGachis/task/add-smartway-design-token
Browse files Browse the repository at this point in the history
✨ GDS-18 - add smartway design token
  • Loading branch information
clementdejoie authored Mar 20, 2024
2 parents 3efb50e + 4cad877 commit 642d12e
Show file tree
Hide file tree
Showing 54 changed files with 26,047 additions and 26,111 deletions.
2 changes: 1 addition & 1 deletion Storybook/components/ActionCard/ActionCard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
\`\`\`
<ActionCard
title="Texte action possible"
titleColor={theme.sw.colors.neutral[500]}
titleColor={theme.sw.color.neutral[500]}
bottomChildren={
<EANInput
value={scanValue}
Expand Down
2 changes: 1 addition & 1 deletion Storybook/components/Alert/Banner.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const Default: Story = {
render(args) {
return (
<View style={{ gap: 8 }}>
<Banner {...args} status='information' />
<Banner {...args} status='info' />
<Banner {...args} status='success' />
<Banner {...args} status='warning' />
<Banner {...args} status='error' />
Expand Down
29 changes: 7 additions & 22 deletions Storybook/components/Colors/Colors.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,15 @@ export default {

type Story = StoryObj<ComponentProps>;

const byNoDeprecatedToken = ([key]: string[]) => {
return ['50', '200', '400', 'main', '600', '800'].includes(key) === false;
};
export const Default: Story = {
render: () => {
const neutral = Object.entries(theme.sw.colors.neutral);
const primary = Object.entries(theme.sw.colors.primary).filter(
byNoDeprecatedToken
);
const information = Object.entries(theme.sw.colors.information).filter(
byNoDeprecatedToken
);
const secondary = Object.entries(theme.sw.colors.secondary).filter(
byNoDeprecatedToken
);
const success = Object.entries(theme.sw.colors.success).filter(
byNoDeprecatedToken
);
const warning = Object.entries(theme.sw.colors.warning).filter(
byNoDeprecatedToken
);
const error = Object.entries(theme.sw.colors.error).filter(
byNoDeprecatedToken
);
const neutral = Object.entries(theme.sw.color.neutral);
const primary = Object.entries(theme.sw.color.primary);
const information = Object.entries(theme.sw.color.info);
const secondary = Object.entries(theme.sw.color.secondary);
const success = Object.entries(theme.sw.color.success);
const warning = Object.entries(theme.sw.color.warning);
const error = Object.entries(theme.sw.color.error);

return (
<ScrollView>
Expand Down
2 changes: 1 addition & 1 deletion Storybook/components/Dialog/Dialog.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const InsideDialog = ({ variantBody }: { variantBody?: 'left' | 'center' }) => {

const styles = StyleSheet.create({
content: {
color: theme.sw.colors.neutral[600],
color: theme.sw.color.neutral[600],
textAlign: variantBody,
lineHeight: 22,
marginBottom: 0,
Expand Down
5 changes: 4 additions & 1 deletion Storybook/components/config/SmartwayDecorator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React, { PropsWithChildren } from 'react';
import { Screen, ThemeProvider } from 'smartway-react-native-ui';
import {
Screen,
ThemeProvider,
} from 'smartway-react-native-ui';

type SmartwayDecoratorProps = PropsWithChildren;

Expand Down
7 changes: 7 additions & 0 deletions Storybook/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@react-native-async-storage/async-storage": "^1.18.2",
"@react-native-community/datetimepicker": "^7.1.0",
"@react-native-community/slider": "^4.3.3",
"@zerogachis/smartway-design-token": "0.1.12",
"appcenter": "5.0.0",
"appcenter-analytics": "5.0.1",
"appcenter-crashes": "5.0.1",
Expand Down
Loading

0 comments on commit 642d12e

Please sign in to comment.