Skip to content

Commit

Permalink
Added CenteredVertically component
Browse files Browse the repository at this point in the history
  • Loading branch information
aeagle committed Jul 22, 2019
1 parent a5ba941 commit 2583456
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions react-spaces/src/components/Centered.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.spaces-centered {
text-align: center;
.spaces-centered-vertically {
position: relative;
top: 50%;
transform: translateY(-50%);
}

.spaces-centered {
@extend .spaces-centered-vertically;
text-align: center;
}
6 changes: 6 additions & 0 deletions react-spaces/src/components/Centered.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ export const Centered : React.FC = (props) => (
<div className='spaces-centered'>
{props.children}
</div>
)

export const CenteredVertically : React.FC = (props) => (
<div className='spaces-centered-vertically'>
{props.children}
</div>
)

0 comments on commit 2583456

Please sign in to comment.