-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Documentation for Font and SVG Icons
- Loading branch information
1 parent
a13fcdc
commit 182edff
Showing
8 changed files
with
42 additions
and
47 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
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
## Font Icons | ||
This component will render any [icon](https://www.google.com/design/spec/style/icons.html#) defined in any style sheets included in your project. | ||
We are using [Google's Material Design Icons](https://github.com/google/material-design-icons) for our documentation site along with some custom icons. | ||
You can use sites like IcoMoon for generating custom font files. To use FontIcons, add your stylesheet to your project and reference the icon's className in the "className" prop. | ||
You can use sites like IcoMoon for generating custom font files. | ||
To use FontIcons, add your stylesheet to your project and reference the icon's className in the "className" prop. | ||
|
||
We also support [Google's Material Icons](http://google.github.io/material-design-icons/) as seen in the third block of code. If you're using the material icons, be sure to include the link to the font icon file in your head section: | ||
We also support [Google's Material Icons](http://google.github.io/material-design-icons/) as seen in the third block of code. | ||
If you're using the material icons, be sure to include the link to the font icon file in your head section: | ||
```html | ||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||
``` | ||
|
||
To see available Material Icons, go to [material icons library](https://design.google.com/icons/). The names are in snake_case format, for example: find_in_page | ||
To see available Material Icons, go to [material icons library](https://design.google.com/icons/). | ||
Google's material icon's names are in snake_case format. For example: ActionHome would be written as action_home. | ||
|
||
### Examples |
18 changes: 0 additions & 18 deletions
18
docs/src/app/components/pages/components/Icons/ExampleHover.jsx
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
docs/src/app/components/pages/components/SVGIcon/ExampleHover.jsx
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,16 @@ | ||
import React from 'react'; | ||
import Colors from 'material-ui/lib/styles/colors'; | ||
import ActionHome from 'material-ui/lib/svg-icons/action/home'; | ||
|
||
const iconStyles = { | ||
marginRight: 24, | ||
}; | ||
|
||
const SvgIconExampleHover = () => ( | ||
<div> | ||
<ActionHome style={iconStyles}/> | ||
<ActionHome style={iconStyles} color={Colors.blue500} hoverColor={Colors.greenA200} /> | ||
</div> | ||
); | ||
|
||
export default SvgIconExampleHover; |
11 changes: 4 additions & 7 deletions
11
docs/src/app/components/pages/components/SVGIcon/ExampleSimple.jsx
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 |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import React from 'react'; | ||
import Colors from 'material-ui/lib/styles/colors'; | ||
import ActionHome from 'material-ui/lib/svg-icons/action/home'; | ||
|
||
const iconStyles = { | ||
marginRight: 24, | ||
}; | ||
|
||
const SVGIconExampleSimple = () => ( | ||
<div> | ||
<ActionHome style={iconStyles} color={Colors.yellow500} hoverColor={Colors.greenA200} /> | ||
<ActionHome style={iconStyles} color={Colors.blue500} hoverColor={Colors.greenA200} /> | ||
</div> | ||
const SvgIconExampleSimple = () => ( | ||
<ActionHome style={iconStyles} /> | ||
); | ||
export default SVGIconExampleSimple; | ||
|
||
export default SvgIconExampleSimple; |
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 |
---|---|---|
@@ -1,15 +1,5 @@ | ||
## SVG Icons | ||
Using mui.SvgIcon, we can create a custom [svg component](https://www.google.com/design/spec/style/icons.html#). Here we are creating the ActionHome SvgIcon for this docs site, and using it in some separate component. | ||
Using material-ui's SVG Icon, we can create a custom [svg component](https://www.google.com/design/spec/style/icons.html#icons-system-icons). In our examples, we are creating the ActionHome SvgIcon for this docs site, and using it in some separate component. | ||
Custom SvgIcon components can be included as children for other Material UI components that use icons such as [IconButtons](http://www.material-ui.com/#/components/icon-buttons). | ||
|
||
For all of the Google's Material Design Icons prebuilt SvgIcon components exist. They can be used this way: | ||
```javascript | ||
import SocialNotificationsActive from 'material-ui/lib/svg-icons/social/notifications-active'; | ||
... | ||
render: function() { | ||
return ( | ||
<SocialNotificationsActive /> | ||
); | ||
} | ||
``` | ||
### Examples |