https://linen.dev logo
Join Discord
Powered by
# react
  • a

    ambitious-knife-25690

    02/23/2022, 3:11 PM
    like i'd assume it would be
    Copy code
    hx
    MuiTheme.createMuiTheme({
      palette: {
        primary: {
          main: "#3f51b5"
        },
        secondary: {
        main: "#f50057"
        },
      }
    });
  • a

    ambitious-knife-25690

    02/23/2022, 3:12 PM
    but doesn't seem to be right
  • a

    ambitious-knife-25690

    02/23/2022, 3:15 PM
    ohooo.... apparantly that is right
  • a

    ambitious-knife-25690

    02/23/2022, 3:16 PM
    it's just because i was not assigning it to a variable it created a lot of macro errors 😂
  • a

    ambitious-knife-25690

    02/23/2022, 3:20 PM
    changing palette type doesn't seem to trigger the dark theme 🤔
  • a

    ambitious-knife-25690

    02/23/2022, 3:21 PM
    it only seems to affect icons
  • g

    gray-state-67732

    02/23/2022, 5:15 PM
    Check mui docs; you might need to grab the dark palette instead of setting it to dark
  • g

    gray-state-67732

    02/23/2022, 5:15 PM
    I think that field just says "this palette is dark, so display icons and whatnot as if it was a dark theme" only
  • a

    ambitious-knife-25690

    02/23/2022, 5:23 PM
    nah it says it's a global thing
  • a

    ambitious-knife-25690

    02/23/2022, 5:23 PM
    it does seem like "something" to do with my code, but I can't seem to figure out what it is
  • g

    gray-state-67732

    02/23/2022, 5:24 PM
    🤷‍♂️
  • a

    ambitious-knife-25690

    02/23/2022, 5:24 PM
    Here i've got nothing dark
  • a

    ambitious-knife-25690

    02/23/2022, 5:25 PM
    but i open up a dialogue and it has the theme applied
  • a

    ambitious-knife-25690

    02/23/2022, 5:25 PM
    it's weird
  • g

    gray-state-67732

    02/23/2022, 5:36 PM
    You have the provider as root element,right?
  • a

    ambitious-knife-25690

    02/23/2022, 5:48 PM
    Copy code
    <BrowserRouter><MuiThemeProvider theme={theme}><$App/></MuiThemeProvider></BrowserRouter>
  • a

    ambitious-knife-25690

    02/23/2022, 5:48 PM
    i have browserrouter wrapping it
  • a

    ambitious-knife-25690

    02/23/2022, 5:48 PM
    but i thought I needed that to be the root element
  • a

    ambitious-knife-25690

    02/23/2022, 5:48 PM
    will try theme provider above that
  • a

    ambitious-knife-25690

    02/23/2022, 5:50 PM
    makes no difference if i switch those 2
  • a

    ambitious-knife-25690

    03/04/2022, 3:50 PM
    Copy code
    hx
    accor_root: {
      border: '1px solid rgba(0, 0, 0, .125)',
      '&expanded': {
        margin: 'auto',
    }
  • a

    ambitious-knife-25690

    03/04/2022, 3:51 PM
    I'm assuming modding child style props in this way isn't supported by mui?
  • a

    ambitious-knife-25690

    03/04/2022, 3:51 PM
    the
    &expanded
  • a

    ambitious-knife-25690

    03/04/2022, 3:51 PM
    I can't seem to get margin to stop working on accordions through the methods suggested on google
  • g

    gray-state-67732

    03/04/2022, 4:00 PM
    "&.expanded"
    should work?
  • g

    gray-state-67732

    03/04/2022, 4:01 PM
    '&expanded'
    means
    accor_rootexpanded
    class (assuming
    accor_root
    would be compiled to
    "accor_root"
    which it may not)
  • a

    ambitious-knife-25690

    03/04/2022, 4:06 PM
    I'm trying to modify the classes defined with
    Record<ClassKey>
    so usage looks like:
    <Accordion square classes={{root: classes.accor_root, expanded: classes.expanded}}>
  • a

    ambitious-knife-25690

    03/04/2022, 4:08 PM
    trying to get rid of that annoying random margin being added to the top of the panel when expanding it
  • g

    gray-state-67732

    03/04/2022, 4:10 PM
    I use another of my libs for that °°
  • a

    ambitious-knife-25690

    03/04/2022, 4:11 PM
    oh, what lib 👀
1...697071...80Latest