Skip to content

Commit

Permalink
♻️ Refactor chakra styling #1378
Browse files Browse the repository at this point in the history
  • Loading branch information
millianapia committed Jan 10, 2023
1 parent 7a635ff commit 854ead7
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions web/components/src/Accordion/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@ export type CAccordionHeaderProps = {
headingLevel?: 'h2' | 'h3' | 'h4' | 'h5'
} & ChakraAccordionButtonProps

const StyledCAccordionButton = styled(CAccordionButton)`
display: flex;
align-items: center;
width: 100%;
background: transparent;
padding: var(--space-medium) 0;
border: none;
cursor: pointer;
&[data-focus-visible-added]:focus {
${outlineTemplate(outline)}
}
`
const StyledRAccordionButton = styled(RAccordionButton)`
display: flex;
align-items: center;
Expand Down Expand Up @@ -104,11 +92,7 @@ export const Header = Flags.IS_DEV

return (
<StyledHeader forwardedAs={headingLevel}>
<StyledCAccordionButton
ref={ref}
style={{ paddingLeft: 0, paddingTop: '1em', paddingBottom: '1em' }}
{...rest}
>
<CAccordionButton ref={ref} style={{ paddingLeft: 0, paddingTop: '1em', paddingBottom: '1em' }} {...rest}>
{isOpen ? (
<StyledIcon>
<OutlineIcon size={iconSize} data={remove_outlined} />
Expand All @@ -123,7 +107,7 @@ export const Header = Flags.IS_DEV
<StyledTypography isExpanded={isOpen} forwardedAs="span">
{children}
</StyledTypography>
</StyledCAccordionButton>
</CAccordionButton>
</StyledHeader>
)
})
Expand Down

0 comments on commit 854ead7

Please sign in to comment.