Set border radius for buttons in theme.js?
See original GitHub issueSorry for making so many issues, I just couldn’t find this in docs.
How do I set border radius for buttons?
I know how to set border for a variant.
buttons: {
primary: {
background: 'black',
color: 'white',
borderRadius: 40
},
secondary: {
color: 'white',
background: 'blue'
}
}
But I use the same border raidus everywhere. Is there any way to make all buttons have the same border?
I tried this:
radii: {
buttons: 48
}
And this:
buttons: {
borderRadius: 20,
primary: {
background: 'black',
color: 'white'
},
secondary: {
color: 'white',
background: 'blue'
}
},
both don’t work
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
How do I change the shape of a button in MUI using theme?
There is a global border radius shape value in the theme. You can change it like this: const theme = createMuiTheme({ shape: {...
Read more >border-radius - CSS: Cascading Style Sheets - MDN Web Docs
The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, ......
Read more >How To Create Round Buttons - W3Schools
How TO - Round Buttons. ❮ Previous Next ❯. Learn how to style round buttons with CSS. ... Add rounded corners to a...
Read more >The Complete Guide to Material-UI Border Radius (4 Examples)
A default design pattern in Material-UI is to create rounded corners with border radius. There are several ways to customize border radius ......
Read more >17+ CSS Round Buttons [Examples & How to create]
To create a rounded button you have to make use of the border-radius CSS property. The higher the value for that property the...
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
Thanks for demo!
I finally found what the hell was going on
I used
rebass
instead ofrebass/styled-components
all the time… and this caused the issue (most probably)I feel so dumb…
Here is a working example: https://codesandbox.io/s/rebass-sandbox-gvs14