Skip to content

Commit

Permalink
fix: Add example for PageLayout in styleguide (#1158)
Browse files Browse the repository at this point in the history
fix: Add example for PageLayout in styleguide
  • Loading branch information
ptbrowne authored Sep 17, 2019
2 parents 4696fa2 + fd468c5 commit d2bbd99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ module.exports = {
'../react/Layout/Layout.jsx',
'../react/Hero/index.jsx',
'../react/Sidebar/index.jsx',
'../react/Circle/index.jsx'
'../react/Circle/index.jsx',
'../react/Page/index.jsx'
]
},
{
Expand Down
6 changes: 4 additions & 2 deletions react/Page/Readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
The Page components enables to make layout that react well to keyboard appearing/disappearing.
The Page components enables to build a layout that react well to keyboard appearing/disappearing.

In the example below, the Button will appear at the bottom of the screen even if the PageContent
does not takes all the space (the content grows to fill all the page). When the keyboard is
shown, the Page real estate shrink and the Button will try to appear above the keyboard if it
shown, the Page real estate shrinks and the Button will try to appear above the keyboard if it
has enough space.

```jsx static
const { PageLayout, PageContent, PageFooter } = require('./index');

<PageLayout>
<PageContent>Hello world !</PageContent>
<PageFooter><Button>Click me !</Button></PageFooter>
Expand Down

0 comments on commit d2bbd99

Please sign in to comment.