Create custom style prop or more prop to customize style
See original GitHub issueIs your feature request related to a problem? Please describe.
I add w-full
class on Button component to use it by full width, but internal class w-fit
ignore it.
<Button type='button' className='w-full bg-primary-500' onClick={handleOpenAddView}>
글 작성하기
</Button>
Describe the solution you’d like maybe 2 option (just suggestion). Also, I think other components will need this option too.
- add
width
prop on Button component. then user can customize button component’s width
// for full width button
<Button width='full'>
sdfsdf
</Button>
// for CTA button 🟩🟩🟩 🟦
<Button width='0.75'>
🟩🟩🟩
</Button>
<Button width='0.25'>
🟦
<Button>
- add custom style prop to customize free without priority issue
<Button custom='w-full'>
custom prop should have high priority then internal class
</Button>
Additional context discord thread
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:8
Top Results From Across the Web
How To Customize React Components with Props
In this tutorial, you'll create custom components by passing props to your component. Props are arguments that you provide to a JSX element....
Read more >Custom Props - Styled System
To change how a style prop value is transformed, provide a custom transform function. The function takes two arguments: (value, scale) , where...
Read more >Customizing Material UI Styles with parameters and props
Source: https://github.com/truthseekers/ style -params-materialui/Join the fight: https://truthseekers.io/support-nuclear/
Read more >How to pass custom style for props in react using the map ...
I created a prop object and passed data through the array. However is there any way i can pass the style through the...
Read more >How to customize - Material UI - MUI
The sx prop is the best option for adding style overrides to a single instance of a component in most cases. It can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We should document that behavior for sure ^
@emewjin the second option. 'Cause you will always complete overwrite the style that you are customizing on your own theme.