Skip to content

Commit

Permalink
using border color from mui theme divider
Browse files Browse the repository at this point in the history
  • Loading branch information
jpaladin committed Jan 8, 2024
1 parent 14b0a4c commit 6abf7e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/react-ui/ItemAccordion/ItemAccordionActions.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useTheme } from '@mui/material';
import MuiAccordionActions, { type AccordionActionsProps } from '@mui/material/AccordionActions';

/**
Expand All @@ -8,8 +9,9 @@ import MuiAccordionActions, { type AccordionActionsProps } from '@mui/material/A
* @public
*/
export function ItemAccordionActions(props: AccordionActionsProps) {
const theme = useTheme();
return (
<MuiAccordionActions {...props} sx={{ borderTop: '1px solid rgba(0, 0, 0, .125)', ...props.sx }} />
<MuiAccordionActions {...props} sx={{ borderTop: '1px solid', borderTopColor: theme.palette.divider, ...props.sx }} />
);
}

Expand Down
5 changes: 3 additions & 2 deletions packages/react-ui/ItemAccordion/ItemAccordionDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useTheme } from '@mui/material';
import MuiAccordionDetails, { type AccordionDetailsProps } from '@mui/material/AccordionDetails';

/**
Expand All @@ -8,9 +9,9 @@ import MuiAccordionDetails, { type AccordionDetailsProps } from '@mui/material/A
* @public
*/
export function ItemAccordionDetails(props: AccordionDetailsProps) {

const theme = useTheme();
return (
<MuiAccordionDetails {...props} sx={{ padding: 16, borderTop: '1px solid rgba(0, 0, 0, .125)', ...props.sx }} />
<MuiAccordionDetails {...props} sx={{ padding: 16, borderTop: '1px solid', borderTopColor: theme.palette.divider, ...props.sx }} />
);
}

Expand Down

0 comments on commit 6abf7e2

Please sign in to comment.