Skip to content

Commit 890e7ab

Browse files
committed
Fix Stepper
1 parent 9dc7828 commit 890e7ab

File tree

4 files changed

+219
-145
lines changed

4 files changed

+219
-145
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { SVGProps } from 'react'
2+
3+
export function IconMinus({ ...props }: SVGProps<SVGSVGElement>) {
4+
return (
5+
<svg
6+
fill="none"
7+
height="28"
8+
viewBox="0 0 28 28"
9+
width="28"
10+
xmlns="http://www.w3.org/2000/svg"
11+
{...props}
12+
>
13+
<path
14+
clipRule="evenodd"
15+
d="M9 14C9 13.4477 9.3731 13 9.83333 13H18.1667C18.6269 13 19 13.4477 19 14C19 14.5523 18.6269 15 18.1667 15H9.83333C9.3731 15 9 14.5523 9 14Z"
16+
fill="currentColor"
17+
fillRule="evenodd"
18+
/>
19+
</svg>
20+
)
21+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { SVGProps } from 'react'
2+
3+
export function IconPlus({ ...props }: SVGProps<SVGSVGElement>) {
4+
return (
5+
<svg
6+
fill="none"
7+
height="28"
8+
viewBox="0 0 28 28"
9+
width="28"
10+
xmlns="http://www.w3.org/2000/svg"
11+
{...props}
12+
>
13+
<path
14+
d="M14.8333 9.83333C14.8333 9.3731 14.4602 9 14 9C13.5397 9 13.1666 9.3731 13.1666 9.83333V13.1667H9.8333C9.37307 13.1667 8.99997 13.5398 8.99997 14C8.99997 14.4602 9.37307 14.8333 9.8333 14.8333H13.1666V18.1667C13.1666 18.6269 13.5397 19 14 19C14.4602 19 14.8333 18.6269 14.8333 18.1667V14.8333H18.1666C18.6269 14.8333 19 14.4602 19 14C19 13.5398 18.6269 13.1667 18.1666 13.1667H14.8333V9.83333Z"
15+
fill="currentColor"
16+
/>
17+
</svg>
18+
)
19+
}

packages/components/src/components/Stepper/Stepper.stories.tsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import { Meta, StoryObj } from '@storybook/react-vite'
22

3-
import { Stepper } from './index'
3+
import {
4+
Stepper,
5+
StepperContainer,
6+
StepperDecreaseButton,
7+
StepperIncreaseButton,
8+
StepperInput,
9+
} from './index'
410

511
type Story = StoryObj<typeof meta>
612

@@ -18,9 +24,16 @@ const meta: Meta<typeof Stepper> = {
1824
}
1925

2026
export const Default: Story = {
21-
args: {
22-
value: 1,
23-
},
27+
args: {},
28+
render: (args) => (
29+
<Stepper {...args}>
30+
<StepperContainer>
31+
<StepperDecreaseButton />
32+
<StepperInput editable={false} />
33+
<StepperIncreaseButton />
34+
</StepperContainer>
35+
</Stepper>
36+
),
2437
}
2538

2639
export default meta

0 commit comments

Comments
 (0)