Skip to content

Commit

Permalink
fix(pencil): Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
sithumn committed Sep 17, 2018
1 parent 86b0af1 commit 8ad61c4
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Expand Up @@ -60,6 +60,39 @@ import MaterialIcon, {colorPalette} from 'material-icons-react';
<MaterialIcon icon="dashboard" color='#7bb92f' />
```

## Showing a preloader until the icon is rendered(For slow connections)
1. CSS

```
.lds-ripple {
display: inline-block;
position: relative;
width: 64px;
height: 64px;
}
.lds-ripple div {
position: absolute;
border: 4px solid #921515;
opacity: 1;
border-radius: 50%;
animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.lds-ripple div:nth-child(2) {
animation-delay: -0.5s;
}
```

2. Preloader element

```
let loader = <div className="lds-ripple"><div></div><div></div></div>
```

3. Icon

```
<MaterialIcon icon="dashboard" preloader={loader} />
```

## Icon size matrix
| Alias | Size |
Expand Down

0 comments on commit 8ad61c4

Please sign in to comment.