diff --git a/Storybook/components/Colors/Colors.stories.tsx b/Storybook/components/Colors/Colors.stories.tsx index 9c3972a8..fe94fc0a 100644 --- a/Storybook/components/Colors/Colors.stories.tsx +++ b/Storybook/components/Colors/Colors.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from '@storybook/react-native'; import React from 'react'; -import { ScrollView, Text } from 'react-native'; +import { ScrollView, Text, View } from 'react-native'; import { Badge } from 'react-native-paper'; import { theme } from '../../../src/styles/themes'; import { Headline } from 'smartway-react-native-ui'; @@ -13,6 +13,22 @@ export default { type Story = StoryObj; +const ColorItem = ({ token, value, color }) => { + return ( + + {token} + {value} + + ); +}; + export const Default: Story = { render: () => { const neutral = Object.entries(theme.sw.color.neutral); @@ -28,110 +44,83 @@ export const Default: Story = { Neutral {neutral.map(([key, hex]) => { return ( - - {key} - + /> ); })} Primary {primary.map(([key, hex]) => { return ( - - {key} - + /> ); })} Secondary {secondary.map(([key, hex]) => { return ( - - {key} - + /> ); })} Information {information.map(([key, hex]) => { return ( - - {key} - + /> ); })} Success {success.map(([key, hex]) => { return ( - - {key} - + /> ); })} Warning {warning.map(([key, hex]) => { return ( - - {key} - + /> ); })} Error {error.map(([key, hex]) => { return ( - - {key} - + /> ); })} ); }, }; + Default.parameters = { noSafeArea: false }; diff --git a/src/__tests__/components/__snapshots__/DateField.test.tsx.snap b/src/__tests__/components/__snapshots__/DateField.test.tsx.snap index be37c3ce..f8d75fe5 100644 --- a/src/__tests__/components/__snapshots__/DateField.test.tsx.snap +++ b/src/__tests__/components/__snapshots__/DateField.test.tsx.snap @@ -257,7 +257,7 @@ exports[`MODULE | DateField component renders correctly in error state 1`] = ` selectionColor="#18a58629" style={ { - "backgroundColor": "#ff563014", + "backgroundColor": "#ffe4de", "borderColor": undefined, "borderRadius": 18, "borderWidth": 0, diff --git a/src/components/dateSelector/DateField.tsx b/src/components/dateSelector/DateField.tsx index efb95524..0d060714 100644 --- a/src/components/dateSelector/DateField.tsx +++ b/src/components/dateSelector/DateField.tsx @@ -136,9 +136,7 @@ function useDateFieldStyle( break; case 'error': textColor = theme.sw.color.error[500]; - backgroundColor = - // TODO: use new tokens - theme.sw.color.error[500] + '14'; + backgroundColor = theme.sw.color.error[100]; break; default: textColor = theme.sw.color.neutral[500];