Skip to content

Commit c63f9d9

Browse files
author
Luke Bowerman
authored
Merge pull request #1453 from looker-open-source/hack/divider-vertical
DividerVertical supports SpaceProps
2 parents 80b16ce + 306ee80 commit c63f9d9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/components/src/Divider/DividerVertical.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*/
2626

2727
import styled from 'styled-components'
28+
import { space } from '@looker/design-tokens'
2829
import { DividerBase, DividerProps } from './Divider'
2930

3031
export interface DividerVerticalProps extends DividerProps {
@@ -43,10 +44,14 @@ export const DividerVertical = styled(DividerBase).attrs(
4344
return { 'data-testid': 'DividerVertical', height: props.height || '1rem' }
4445
}
4546
)<DividerVerticalProps>`
47+
${space}
4648
display: inline-block;
47-
margin-left: ${({ theme }) => theme.space.xsmall};
48-
margin-right: ${({ theme }) => theme.space.xsmall};
4949
width: ${({ size }) => size};
5050
${({ height, stretch }) =>
5151
stretch ? `align-self: stretch;` : `height: ${height};`}
5252
`
53+
54+
DividerVertical.defaultProps = {
55+
mx: 'xxsmall',
56+
my: 'xsmall',
57+
}

0 commit comments

Comments
 (0)