Skip to content

Commit

Permalink
[docs] Add an example with Google Web Fonts (#10332)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Feb 17, 2018
1 parent 80d16ba commit 22198bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages/demos/badges/badges.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Badge generates a small badge to the top-right of its child(ren).

## Simple Badges

Examples of badges containing text, using primary and accent colors. The badge is applied to its children.
Examples of badges containing text, using primary and secondary colors. The badge is applied to its children.

{{"demo": "pages/demos/badges/SimpleBadge.js"}}
14 changes: 11 additions & 3 deletions docs/src/pages/style/icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,22 @@ Material-UI provides two components to render system icons: `Icon` for rendering
The `Icon` component will display an icon from any icon font that supports ligatures.
As a prerequisite, you must include one, such as the
[Material icon font](http://google.github.io/material-design-icons/#icon-font-for-the-web) in your project.
For instance using via Google Web Fonts:
```html
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
```

`Icon` will set the correct class name for the Material icon font. For other fonts, you must supply the
class name using the Icon component's `className` property.

To use an icon simply wrap the icon name (font ligature) with the `Icon` component,
for example `<Icon>star</Icon>`.
for example:
```jsx
<Icon>star</Icon>
```

By default, an Icon will inherit the current text color.
Optionally, you can set the icon color using one of the theme color properties: `accent`, `action`, `contrast`, `disabled`, `error`, & `primary`.
Optionally, you can set the icon color using one of the theme color properties: `secondary`, `action`, `contrast`, `disabled`, `error`, & `primary`.

{{"demo": "pages/style/Icons.js"}}

Expand All @@ -41,7 +49,7 @@ and allows the icon to be styled and respond to mouse events.
The resulting icon can be used as is,
or included as a child for other Material-UI components that use icons.
By default, an Icon will inherit the current text color.
Optionally, you can set the icon color using one of the theme color properties: `accent`, `action`, `contrast`, `disabled`, `error`, & `primary`.
Optionally, you can set the icon color using one of the theme color properties: `secondary`, `action`, `contrast`, `disabled`, `error`, & `primary`.

{{"demo": "pages/style/SvgIcons.js"}}

Expand Down

0 comments on commit 22198bd

Please sign in to comment.