Product: PowerShell Universal
Version: 5.4.1
hey all, Ive been working on a theme to try and implement at least a little visual style to some apps and have come across a few things that my MUI noobness is probably contributing to
Looking at the theme/MUI references I am getting some of the bits to work for me, but have struggled in others. Has anyone solved/covered off these sort of questions re themes:
Reuse of values
In react apps I see lots of examples of people using “base values” in their definitions of components. eg below where the fontSize of this component is being set to the body2 fontsize defined in the theme. Has anyone done similar to this in PSU?
MuiListItemText: {
styleOverrides: {
primary: ({ theme }) => ({
fontSize: theme.typography.body2.fontSize,
fontWeight: 500,
lineHeight: theme.typography.body2.lineHeight,
}),
defaultProps
Another MUI one is being able to set the default values of some things - eg setting the default size of chips to be small
MuiChip: {
defaultProps: {
size: 'small',
}
I tried this in a theme hashtable ad a few other ideas but with no success yet
overrides = @{
MuiChip = @{
defaultProps = @{
size = "small"
}
}
}
Header Height
A third one is how to tell if the hashtable is correct, eg if Im trying to change the minHeight of the page header I can see the header in chrome using the MuiToolbar-root
classname, but I dont see that classname defined anywhere in the page styles, and if I set the hashtable to include the name by that path the value doesn’t appear to hit the css styles
I think a lot of this is im trying to correlate a range of the details as described in Themed components - Material UI into the PSU Hashtable equivalent
Anyone fiddled with some of these items