-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Add DropdownCustom component #285
base: master
Are you sure you want to change the base?
Conversation
Hi @henckellbach and thanks for your contribution! Sorry for my late comment but I was investigating what is happening on our build workflow since CodeSandbox is showing errors You are installing a dependency on |
adding skipLibCheck to prevent tsc considering node_modules
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ef3364c:
|
There is two new commits in your branch fixing all building issues and we are ready to review it and discuss this new component! |
@ggdaltoso Awesome! This is my first contribution to this project so please feel free to point out any issues 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks amazing, @henckellbach !
Thanks for your contribution!
I just want to mention that you will need to add the import and the export of this component in components/intex.ts, to make this component available.
width: 17px; | ||
height: 17px; | ||
font-size: 14px; | ||
line-height: 1.1; | ||
transform: translate(-3px, -2px); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
width: 17px; | |
height: 17px; | |
font-size: 14px; | |
line-height: 1.1; | |
transform: translate(-3px, -2px); | |
width: 18px; | |
height: 17px; | |
font-size: 14px; | |
line-height: 1.1; | |
transform: translate(-4px, -2px); |
These changes will make our DropdownCustom pixel perfect with our Dropdown
import { th } from '@xstyled/system'; | ||
import { DropdownCustomProps } from './DropdownCustom'; | ||
|
||
import caret from './imgs/downcaret.png'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to import the assets we already have in Dropdown component.
Maybe it makes senses to put your DropdownCustom in the same folder and take the advantage of sharing some styles too.
Hey, @henckellbach! Is it still interesting to you? |
I decided to create a new dropdown component using custom designed options instead of the browser native
<option>
.As the styles and logic differ quite a lot, I opted to make this a new component and not unify with the existing Dropdown.
Any feedback welcome 💪
New component
Actual OS
Possible Next Steps
Dropdown
toSelect
andDropdownCustom
toDropdown
?PropsWithHTMLAttributes
across the codebase?