-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from mui-org/next
current mui version
- Loading branch information
Showing
13 changed files
with
363 additions
and
213 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react'; | ||
import { makeStyles } from '@material-ui/styles'; | ||
import Paper from '@material-ui/core/Paper'; | ||
|
||
const useStyles = makeStyles({ | ||
root: { | ||
padding: 16, | ||
color: 'red', | ||
'& p': { | ||
color: 'green', | ||
'& span': { | ||
color: 'blue', | ||
}, | ||
}, | ||
}, | ||
}); | ||
|
||
export default function NestedStylesHook() { | ||
const classes = useStyles(); | ||
return ( | ||
<Paper className={classes.root}> | ||
This is red since it is inside the paper. | ||
<p> | ||
This is green since it is inside the paragraph{' '} | ||
<span>and this is blue since it is inside the span</span> | ||
</p> | ||
</Paper> | ||
); | ||
} |
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,29 @@ | ||
import React from 'react'; | ||
import { makeStyles } from '@material-ui/styles'; | ||
import Paper from '@material-ui/core/Paper'; | ||
|
||
const useStyles = makeStyles({ | ||
root: { | ||
padding: 16, | ||
color: 'red', | ||
'& p': { | ||
color: 'green', | ||
'& span': { | ||
color: 'blue', | ||
}, | ||
}, | ||
}, | ||
}); | ||
|
||
export default function NestedStylesHook() { | ||
const classes = useStyles(); | ||
return ( | ||
<Paper className={classes.root}> | ||
This is red since it is inside the paper. | ||
<p> | ||
This is green since it is inside the paragraph{' '} | ||
<span>and this is blue since it is inside the span</span> | ||
</p> | ||
</Paper> | ||
); | ||
} |
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
34 changes: 34 additions & 0 deletions
34
docs/src/pages/demos/bottom-navigation/LabelBottomNavigation.tsx
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,34 @@ | ||
import React from 'react'; | ||
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles'; | ||
import BottomNavigation from '@material-ui/core/BottomNavigation'; | ||
import BottomNavigationAction from '@material-ui/core/BottomNavigationAction'; | ||
import Icon from '@material-ui/core/Icon'; | ||
import RestoreIcon from '@material-ui/icons/Restore'; | ||
import FavoriteIcon from '@material-ui/icons/Favorite'; | ||
import LocationOnIcon from '@material-ui/icons/LocationOn'; | ||
|
||
const useStyles = makeStyles({ | ||
root: { | ||
width: 500, | ||
}, | ||
}); | ||
|
||
function LabelBottomNavigation() { | ||
const classes = useStyles(); | ||
const [value, setValue] = React.useState('recents'); | ||
|
||
function handleChange(event: React.ChangeEvent<{}>, newValue: string) { | ||
setValue(newValue); | ||
} | ||
|
||
return ( | ||
<BottomNavigation value={value} onChange={handleChange} className={classes.root}> | ||
<BottomNavigationAction label="Recents" value="recents" icon={<RestoreIcon />} /> | ||
<BottomNavigationAction label="Favorites" value="favorites" icon={<FavoriteIcon />} /> | ||
<BottomNavigationAction label="Nearby" value="nearby" icon={<LocationOnIcon />} /> | ||
<BottomNavigationAction label="Folder" value="folder" icon={<Icon>folder</Icon>} /> | ||
</BottomNavigation> | ||
); | ||
} | ||
|
||
export default LabelBottomNavigation; |
35 changes: 35 additions & 0 deletions
35
docs/src/pages/demos/bottom-navigation/SimpleBottomNavigation.tsx
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,35 @@ | ||
import React from 'react'; | ||
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles'; | ||
import BottomNavigation from '@material-ui/core/BottomNavigation'; | ||
import BottomNavigationAction from '@material-ui/core/BottomNavigationAction'; | ||
import RestoreIcon from '@material-ui/icons/Restore'; | ||
import FavoriteIcon from '@material-ui/icons/Favorite'; | ||
import LocationOnIcon from '@material-ui/icons/LocationOn'; | ||
|
||
const useStyles = makeStyles({ | ||
root: { | ||
width: 500, | ||
}, | ||
}); | ||
|
||
function SimpleBottomNavigation() { | ||
const classes = useStyles(); | ||
const [value, setValue] = React.useState(0); | ||
|
||
return ( | ||
<BottomNavigation | ||
value={value} | ||
onChange={(event, newValue) => { | ||
setValue(newValue); | ||
}} | ||
showLabels | ||
className={classes.root} | ||
> | ||
<BottomNavigationAction label="Recents" icon={<RestoreIcon />} /> | ||
<BottomNavigationAction label="Favorites" icon={<FavoriteIcon />} /> | ||
<BottomNavigationAction label="Nearby" icon={<LocationOnIcon />} /> | ||
</BottomNavigation> | ||
); | ||
} | ||
|
||
export default SimpleBottomNavigation; |
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
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
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
Oops, something went wrong.