Skip to content

Commit

Permalink
Aligning the text to the right
Browse files Browse the repository at this point in the history
  • Loading branch information
drydenwilliams committed Oct 18, 2019
1 parent 2cfb611 commit 500c4f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/EventCard/EventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export const EventCard = (props: IProps) => (
mr={1}
width={1}
>
<Text auxiliary width={1}>
<Text auxiliary width={1} txtRight>
Go to event
</Text>
</GoToEventLink>
Expand Down
5 changes: 5 additions & 0 deletions src/components/Text/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface ITextProps {
txtcenter?: boolean
capitalize?: boolean
bold?: boolean
txtRight?: boolean

large?: boolean
medium?: boolean
Expand Down Expand Up @@ -41,6 +42,9 @@ export const inline = (props: ITextProps) =>
export const txtcenter = (props: ITextProps) =>
props.txtcenter ? { textAlign: 'center' } : null

export const txtRight = (props: ITextProps) =>
props.txtRight ? { textAlign: 'right' } : null

export const regular = (props: ITextProps) =>
props.regular ? { fontWeight: 400 } : null

Expand Down Expand Up @@ -104,6 +108,7 @@ export const BaseText = styled(RebassText)`
${tags}
${auxiliary}
${paragraph}
${txtRight}
`

type TextProps = ITextProps & RebassTextProps
Expand Down

0 comments on commit 500c4f4

Please sign in to comment.