Fix margin on DeleteModal overlay (#998)

* Fix margin on DeleteModal overlay

* Update chromatic ci triggers

* Update chromatic ci triggers
This commit is contained in:
Charles Bochet
2023-07-30 13:17:33 -07:00
committed by GitHub
parent be835af48b
commit eafa30a9cf
24 changed files with 388 additions and 335 deletions

View File

@ -0,0 +1,35 @@
import { ReactNode } from 'react';
import styled from '@emotion/styled';
type OwnProps = {
children: ReactNode;
alignment?: SectionAlignment;
fullWidth?: boolean;
};
export enum SectionAlignment {
Left = 'left',
Center = 'center',
}
const StyledSection = styled.div<{
alignment: SectionAlignment;
fullWidth: boolean;
}>`
margin-bottom: ${({ theme }) => theme.spacing(4)};
margin-top: ${({ theme }) => theme.spacing(4)};
text-align: ${({ alignment }) => alignment};
width: ${({ fullWidth }) => (fullWidth ? '100%' : 'auto')};
`;
export function Section({
children,
alignment = SectionAlignment.Left,
fullWidth = true,
}: OwnProps) {
return (
<StyledSection alignment={alignment} fullWidth={fullWidth}>
{children}
</StyledSection>
);
}