Skip to content

Commit

Permalink
feat: Add Stack component and styles
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 3, 2020
1 parent 10df676 commit dde2f10
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 5 deletions.
45 changes: 40 additions & 5 deletions src/components/ComponentExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ const EXAMPLE_CSS = `
margin-left: 0.5rem;
}
.nr1-RedBox {
color: red;
background: rgba(255, 0, 0, 0.15);
box-shadow: inset 0 0 0 1px rgba(255, 0, 0, 0.5);
.nr1-Box,
.nr1-RedBox,
.nr1-Box--a,
.nr1-Box--b,
.nr1-Box--c {
display: flex;
align-items: center;
justify-content: center;
Expand All @@ -54,6 +54,41 @@ const EXAMPLE_CSS = `
width: 100%;
height: 100%;
}
.nr1-RedBox {
color: red;
background: rgba(255, 0, 0, 0.15);
box-shadow: inset 0 0 0 1px rgba(255, 0, 0, 0.5);
margin-bottom: 0.5rem;
}
[class^=nr1-Example--stack--direction],
[class^=nr1-Example--stack--horizontal],
[class^=nr1-Example--stack--gap],
[class^=nr1-Example--stack--vertical] {
margin-bottom: 1.25rem;
}
.nr1-Example--stack--title {
display: block;
font-size: 1.5em;
margin-bottom: 1.25rem;
}
.nr1-Box--a {
min-height: 70px;
min-width: 70px;
}
.nr1-Box--b {
min-height: 90px;
min-width: 40px;
}
.nr1-Box--c {
min-height: 40px;
min-width: 90px;
}
`;

const ComponentExample = ({
Expand Down
4 changes: 4 additions & 0 deletions src/data/sidenav.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
{
"displayName": "Grid",
"url": "/components/grid"
},
{
"displayName": "Stack",
"url": "/components/stack"
}
]
},
Expand Down
7 changes: 7 additions & 0 deletions src/markdown-pages/components/stack.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
path: '/components/stack'
title: 'Stack'
description: 'A Stack component!'
component: 'Stack'
template: 'ReferenceTemplate'
---

0 comments on commit dde2f10

Please sign in to comment.