Skip to content

Commit 83872d4

Browse files
committed
centering ListItem content
1 parent 285d5a0 commit 83872d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/ListItem/ListItem.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ import { padding, blockSizes } from '../common/system';
88
const StyledListItem = styled.li`
99
box-sizing: border-box;
1010
11-
display: block;
11+
display: flex;
12+
align-items: center;
1213
position: relative;
1314
height: ${props => blockSizes[props.size]};
1415
width: ${props => (props.square ? blockSizes[props.size] : 'auto')};
1516
padding: 0 ${padding.sm};
1617
1718
white-space: nowrap;
18-
text-align: ${props => (props.square ? 'center' : 'left')};
19+
justify-content: ${props =>
20+
props.square ? 'space-around' : 'space-between'};
21+
text-align: center;
1922
line-height: ${props => blockSizes[props.size]};
2023
color: ${({ theme }) => theme.text};
2124
pointer-events: ${({ isDisabled }) => (isDisabled ? 'none' : 'auto')};

0 commit comments

Comments
 (0)