欧美一区二区三区,国内熟女精品熟女A片视频小说,日本av网,小鲜肉男男GAY做受XXX网站

MUI手風琴風格的作品,但風格(手風琴)不工作

劉姿婷1年前8瀏覽0評論

我正在嘗試為MUI折疊組件設置寬度:100%。我的組件結構如下。應用style = { { width:& quot;100% & quot;}}直接就可以了。但是當我創建一個單獨的樣式組件時,它不起作用。

<Accordion defaultExpanded style={{ width: "100%" }}>
  <StyledAccordionSummary>
    <Typography noWrap>
      {name}
    </Typography>
    {filterComponent}
  </StyledAccordionSummary>
  <StyledAccordionDetails>
    <List>{children}</List>
  </StyledAccordionDetails>
</Accordion>

以下不起作用:

export const StyledAccordion = styled(Accordion)(() => ({
  '& .MuiPaper-root': {
    width: "100%"
  },
}));


<StyledAccordion>
.....
</StyledAccordion>

是因為這個類不僅包含了MuiPaper-root,還包含了下面的內容嗎?

class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation1 
        MuiAccordion-root MuiAccordion-rounded Mui-expanded MuiAccordion-gutters css- 
        g8v8pi-MuiPaper-root-MuiAccordion-root"