API to override input sizes
See original GitHub issueHi,
I am redesigning Mantine components as per our organization’s design system. I want to change the height & padding of all input elements to match our design guidelines. e.g.
height of buttons for
- ‘sm’ size should be 32 instead of the default 36
- ‘md’ size should be 40 instead of the default 42
I found that there’s is const
defined in the code under https://github.com/mantinedev/mantine/blob/master/src/mantine-core/src/components/Input/Input.styles.ts
export const sizes = { xs: 30, sm: 36, md: 42, lg: 50, xl: 60, };
Is there a way to override these sizes through Styles API? I want to have something similar to below snippet.
export const Styles = {
Button: (theme: MantineTheme) => ({
// root: {
// [if(ButtonSize === 'lg')]: { height: 48 },
// [if(ButtonSize === 'md')]: { height: 40 },
// [if(ButtonSize === 'sm')]: { height: 32 },
// },
filled: {
backgroundColor: theme.colors.blue[5],
'&:hover': {
backgroundColor: theme.colors.blue[6],
},
},
outline: {
borderColor: theme.colors.blue[5],
color: theme.colors.blue[5],
'&:hover': {
backgroundColor: theme.colors.blue[0],
},
},
}),
};
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Can CSS over-rule HTML input size declarations
CSS can override the size attribute using width . There's a good explanation about it here. Here, we have a typical input, size...
Read more >Use a mapping template to override an API's request and ...
Tutorial: Override an API's request parameters and headers with the API Gateway console · Under APIs, choose the PetStore API. · In the...
Read more >Retrieve Prompt Override (QPTRTVPO) API
The Retrieve Prompt Override (QPTRTVPO) API calls the prompt override program for a specified command and returns the prompt override command string from ......
Read more >Input API - Material UI
Name Type Default
autoComplete string
autoFocus bool false
classes object
Read more ><input>: The Input (Form Input) element - HTML
Valid for email , password , tel , url , and text , the size attribute specifies how much of the input is...
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
@rtivital We also need this API feature and offer to implement it. Are you ok with that?
Understood