-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for the styleguide.
- Loading branch information
Showing
2 changed files
with
89 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
This is a fullscreen dialog with a button on the right. | ||
|
||
``` | ||
const RaisedButton = require('material-ui/RaisedButton').default; | ||
const FlatButton = require('material-ui/FlatButton').default; | ||
<div> | ||
<FullscreenDialog | ||
open={state.open} | ||
onRequestClose={(...args) => { | ||
setState({ open: false }) | ||
}} | ||
title='Demo dialog' | ||
actionButton={<FlatButton | ||
label='Done' | ||
onClick={() => setState({ open: false })} | ||
/>} | ||
/> | ||
<RaisedButton | ||
onClick={() => setState({ open: true })} | ||
label='Open dialog' | ||
/> | ||
</div> | ||
``` | ||
|
||
The fullscreen dialog also supports an _immersive mode_ that makes the app bar transparent. | ||
|
||
``` | ||
const RaisedButton = require('material-ui/RaisedButton').default; | ||
<div> | ||
<FullscreenDialog | ||
open={state.open} | ||
onRequestClose={(...args) => { | ||
setState({ open: false }) | ||
}} | ||
title='Picture of a cat' | ||
immersive | ||
> | ||
<div style={{ width: '100%', height: '100%', background: 'url(https://lorempixel.com/1920/1080/cats/)', backgroundSize: 'cover' }} /> | ||
</FullscreenDialog> | ||
<RaisedButton | ||
onClick={() => setState({ open: true })} | ||
label='Show cat' | ||
/> | ||
</div> | ||
``` |