diff --git a/.changeset/soft-gorillas-tap.md b/.changeset/soft-gorillas-tap.md new file mode 100644 index 00000000..5b4567a4 --- /dev/null +++ b/.changeset/soft-gorillas-tap.md @@ -0,0 +1,5 @@ +--- +"@status-im/components": patch +--- + +add size variants to Step diff --git a/packages/components/src/step/step.stories.tsx b/packages/components/src/step/step.stories.tsx index 1aa1f45b..ae4f9e99 100644 --- a/packages/components/src/step/step.stories.tsx +++ b/packages/components/src/step/step.stories.tsx @@ -56,20 +56,39 @@ export const AllVariants: Story = { args: {}, render: () => ( - - - - + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + ), diff --git a/packages/components/src/step/step.tsx b/packages/components/src/step/step.tsx index 27bfbe5a..3c3d8d27 100644 --- a/packages/components/src/step/step.tsx +++ b/packages/components/src/step/step.tsx @@ -9,15 +9,16 @@ export type StepVariants = 'neutral' | 'complete' | 'active' type Props = { value: number + size?: 18 | 22 type?: StepVariants } const Step = (props: Props) => { - const { value, type = 'neutral' } = props + const { size = 18, value, type = 'neutral' } = props return ( - - + + {value} @@ -30,7 +31,6 @@ export { Step } export type { Props as StepProps } const Base = styled(Stack, { - paddingVertical: 1, minWidth: 20, maxWidth: 28, display: 'inline-flex', @@ -38,6 +38,20 @@ const Base = styled(Stack, { alignItems: 'center', flexBasis: 'fit-content', width: 'fit-content', + + variants: { + size: { + 18: { + paddingVertical: 1, + minWidth: 20, + maxWidth: 28, + }, + 22: { + minWidth: 24, + maxWidth: 32, + }, + }, + }, }) const Content = styled(Stack, { @@ -45,9 +59,6 @@ const Content = styled(Stack, { paddingHorizontal: 3, paddingVertical: 0, borderRadius: '$6', - height: 18, - minWidth: 18, - maxWidth: 28, justifyContent: 'center', alignItems: 'center', borderWidth: 1, @@ -66,6 +77,18 @@ const Content = styled(Stack, { backgroundColor: '$blue/10', }, }, + size: { + 18: { + height: 18, + minWidth: 18, + maxWidth: 28, + }, + 22: { + height: 22, + minWidth: 22, + maxWidth: 32, + }, + }, }, }) diff --git a/packages/components/src/tabs/tabs.tsx b/packages/components/src/tabs/tabs.tsx index e0471ca2..f58fbc43 100644 --- a/packages/components/src/tabs/tabs.tsx +++ b/packages/components/src/tabs/tabs.tsx @@ -119,7 +119,9 @@ const TabsTrigger = (props: TriggerProps, ref: Ref) => { color, })} - {props.type === 'step' && } + {props.type === 'step' && ( + + )} {children}