-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Update Material UI code export feature #100
Comments
What format exactly are you looking for? Can you link me to an example? |
First of all, sorry didn't get the notification. The current MUI preset code export doesn't work, as it will error when directly entering in your MUI project. The current generated code will error (see image) I tried to use the 'adaptV4Theme', but to no avail. I'd rather expect a working format like so: import { ThemeOptions } from '@mui/material/styles';
export const themeOptions: ThemeOptions = {
palette: {
mode: 'dark',
primary: {
main: '#4caf50',
contrastText: 'rgba(255,255,255,0.87)',
},
secondary: {
main: '#af4cac',
contrastText: '#ffffff',
},
divider: '#bdbdbd',
text: {
primary: '#edfff1',
secondary: '#f9f9f9',
disabled: '#757575',
hint: '#22194d',
},
background: {
default: '#cacceb',
paper: '#4f4caf',
},
},
}; An example of this can be found at https://zenoo.github.io/mui-theme-creator/ |
Thank you for the explanation. This has been updated. Let me know if it works. |
Hey, thank you for this. |
Is there an existing issue for this?
Describe the problem
Currently, the code export for Material UI doesn't work, and will give typing errors, neither the V5, as well as adaptV4Theme works to convert the code export to a readable format by Material UI.
Solution
An updated code export, or an option to pick between Material UI versions
Alternatives
Remaking the theme myself in another open source project dedicated to making a Material UI theme editor, however accents don't seem to be properly conveyed.
Additional context
No response
The text was updated successfully, but these errors were encountered: