Skip to content

chore: add Select component - #16121

Merged
BrunoQuaresma merged 4 commits into
mainfrom
bq/add-select
Jan 13, 2025
Merged

BrunoQuaresma merged 4 commits into
mainfrom
bq/add-select

Conversation

@BrunoQuaresma

@BrunoQuaresma BrunoQuaresma commented Jan 13, 2025 •

Copy link
Copy Markdown
Contributor

Related to #15297 and based on this design.

@BrunoQuaresma BrunoQuaresma self-assigned this Jan 13, 2025
Comment thread site/src/components/Select/Select.tsx Outdated
<SelectPrimitive.Content
ref={ref}
className={cn(
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border border-solid bg-surface-primary text-content-primary shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For long Tailwind class names, I have been following the pattern of using multi-line strings to make these easier to read. See some of the other existing shadcn components.

Comment thread site/src/components/Select/Select.tsx Outdated
));
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;

export {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far I have been exporting in place instead of the bottom of the file for the shadcn components as this matches the current patterns in the codebase.

@jaaydenh jaaydenh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BrunoQuaresma
BrunoQuaresma merged commit c2b5534 into main Jan 13, 2025
@BrunoQuaresma
BrunoQuaresma deleted the bq/add-select branch January 13, 2025 23:29
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants