diff --git a/src/components/Select/index.tsx b/src/components/Select/index.tsx index 736fcd6c..873af07a 100644 --- a/src/components/Select/index.tsx +++ b/src/components/Select/index.tsx @@ -20,7 +20,6 @@ const triggerVariants = cva( [ [ 'flex', - 'h-10', 'w-full', 'border border-[2px]', 'text-foreground', @@ -43,6 +42,7 @@ const triggerVariants = cva( default: [ 'text-foreground', 'border-border-subtle', + 'bg-grey-100', 'hover:border-border-hover', 'hover:text-foreground', 'focus-visible:shadow-blue', @@ -65,10 +65,15 @@ const triggerVariants = cva( 'focus-visible:shadow-green', 'text-green-700' ] + }, + size: { + sm: ['h-[37px]'], + lg: ['h-[42px]'] } }, defaultVariants: { - variant: 'default' + variant: 'default', + size: 'sm' } } ) @@ -80,14 +85,14 @@ export interface TriggerProps const SelectTrigger = React.forwardRef< React.ElementRef, TriggerProps ->(({ variant, className, children, ...props }, ref) => ( +>(({ variant, size, className, children, ...props }, ref) => ( {children} - + diff --git a/stories/Select/Docs.mdx b/stories/Select/Docs.mdx index 79272c10..3f736653 100644 --- a/stories/Select/Docs.mdx +++ b/stories/Select/Docs.mdx @@ -12,6 +12,11 @@ Selects are elements that allow users to interact with and provide data to a sys +## Large + + + + ## Error diff --git a/stories/Select/Select.example.tsx b/stories/Select/Select.example.tsx index bd3a6531..8b2995af 100644 --- a/stories/Select/Select.example.tsx +++ b/stories/Select/Select.example.tsx @@ -15,7 +15,7 @@ interface DemoProps extends TriggerProps { example: string } -export const SelectDemo = ({ variant, example }: DemoProps) => { +export const SelectDemo = ({ variant, size, example }: DemoProps) => { if (example === 'small') { return ( - + {/* Something going wrong with placement of select value when it overflows */} diff --git a/stories/Select/Select.stories.ts b/stories/Select/Select.stories.ts index b0c0cc6d..7c598112 100644 --- a/stories/Select/Select.stories.ts +++ b/stories/Select/Select.stories.ts @@ -20,9 +20,17 @@ type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const Default: Story = { args: { - example: 'small' + example: 'small', + size: 'sm' } } +export const Large: Story = { + args: { + example: 'large', + size: 'lg' + } +} + export const Success: Story = { args: { example: 'small',