Skip to content

chore: add Select component #16121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 13, 2025
Merged

chore: add Select component #16121

merged 4 commits into from
Jan 13, 2025

Conversation

BrunoQuaresma
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma commented Jan 13, 2025

Related to #15297 and based on this design.

@BrunoQuaresma BrunoQuaresma self-assigned this Jan 13, 2025
<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
Contributor

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.

));
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;

export {
Copy link
Contributor

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.

Copy link
Contributor

@jaaydenh jaaydenh left a comment

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
30 checks passed
@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