Skip to content

Commit

Permalink
chore: accordion styles test
Browse files Browse the repository at this point in the history
  • Loading branch information
k0stik committed Aug 7, 2024
1 parent aa65aea commit fc41dbe
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
20 changes: 10 additions & 10 deletions dist/mui/components/accordion/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import { withStyles } from "@mui/styles";
import React, { useEffect, useState } from "react";
import IconByName from "../icon/IconByName";
// deletes header animation in accordion
const StyledAccordion = withStyles({
root: {
margin: "0",
"&$expanded": {
margin: "0",
},
},
expanded: {},
})(MuiAccordion);
// const StyledAccordion = withStyles({
// root: {
// margin: "0",
// "&$expanded": {
// margin: "0",
// },
// },
// expanded: {},
// })(MuiAccordion);
// deletes header animation in accordion
const AccordionSummary = withStyles({
root: {
Expand Down Expand Up @@ -50,7 +50,7 @@ export default function Accordion({ hideExpandIcon, children, isExpanded, header
setIsExpanded((prev) => !prev);
}
};
return (React.createElement(StyledAccordion, { defaultExpanded: isExpanded, expanded: isExpanded_, ...restProps },
return (React.createElement(MuiAccordion, { defaultExpanded: isExpanded, expanded: isExpanded_, ...restProps },
React.createElement(AccordionSummary, { onClick: handleToggleExpanded, "aria-controls": "panel2a-content", expandIcon: !hideExpandIcon && React.createElement(IconByName, { name: "actions.expand" }) }, renderSummary || React.createElement(Typography, { variant: "overline" }, header)),
React.createElement(Divider, null),
React.createElement(AccordionDetails, null, children)));
Expand Down
22 changes: 11 additions & 11 deletions src/mui/components/accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import React, { SyntheticEvent, useEffect, useState } from "react";
import IconByName from "../icon/IconByName";

// deletes header animation in accordion
const StyledAccordion = withStyles({
root: {
margin: "0",
"&$expanded": {
margin: "0",
},
},
expanded: {},
})(MuiAccordion);
// const StyledAccordion = withStyles({
// root: {
// margin: "0",
// "&$expanded": {
// margin: "0",
// },
// },
// expanded: {},
// })(MuiAccordion);

// deletes header animation in accordion
const AccordionSummary = withStyles({
Expand Down Expand Up @@ -73,7 +73,7 @@ export default function Accordion({
};

return (
<StyledAccordion defaultExpanded={isExpanded} expanded={isExpanded_} {...restProps}>
<MuiAccordion defaultExpanded={isExpanded} expanded={isExpanded_} {...restProps}>
<AccordionSummary
onClick={handleToggleExpanded}
aria-controls="panel2a-content"
Expand All @@ -82,6 +82,6 @@ export default function Accordion({
</AccordionSummary>
<Divider />
<AccordionDetails>{children}</AccordionDetails>
</StyledAccordion>
</MuiAccordion>
);
}

0 comments on commit fc41dbe

Please sign in to comment.