Skip to content

Commit

Permalink
improvement(Text): Add align prop to text
Browse files Browse the repository at this point in the history
Add align prop which becomes a text-align attribute for the text.
Options are: left, right, center
  • Loading branch information
Ilari Sinkkonen committed Jun 8, 2017
1 parent 17f9cc7 commit 430ed02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Text.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import colorGetter from './colorGetter';

const textCss = css`
font-size: ${props => props.size || '1rem'};
${props => props.lineh && `line-height: ${props.lineh};`};
${props => props.lineh && `line-height: ${props.lineh};`}
${props => props.color && `color: ${colorGetter(props, props.color)};`}
${props => props.align && `text-align: ${props.align || 'initial'};`}
`;
const Span = styled.span`
${textCss}
Expand Down

0 comments on commit 430ed02

Please sign in to comment.