Files
bigcapital/packages/webapp/src/components/FlexGrid/FlexItem.style.tsx
2023-02-03 01:02:31 +02:00

21 lines
445 B
TypeScript

// @ts-nocheck
import styled from 'styled-components';
import { ItemProps } from './interfaces';
export const FlexItem = styled.div<ItemProps>`
width: 100%;
max-width: ${({ col, gap = 1 }) =>
col && col < 12 ? `${(100 * col) / 12 - gap}%` : '100%'};
${({ marginBottom }) =>
marginBottom &&
`
margin-bottom: ${marginBottom}px;
`}
${({ stretch }) =>
stretch &&
`
display: flex;
align-self: stretch;
`}
`;