Skip to content

Commit

Permalink
Merge pull request #8 from Kosai106/feat/remove-example
Browse files Browse the repository at this point in the history
chore: remove example code
  • Loading branch information
Kosai106 committed Aug 6, 2020
2 parents 6310995 + f7d794e commit 526f578
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 11,196 deletions.
49 changes: 23 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,47 +40,44 @@ src/
```

OR

```bash
# .env
REACT_APP_ICON_PATH=src/images/icons
```

```jsx
// Code
import React from 'react';
import Icon from 'react-icon-system';
import React from "react";
import Icon from "react-icon-system";

const YourComponent = props => (
<Icon src="alert" />
)
const YourComponent = () => <Icon src="alert" />;
```

### Pro tips

Instead of using a static colour for your SVGs, use `currentColor`. This way you can dynamically change the icon colour by using CSS.

__Example:__
```css
.color-red {
color: red;
}
.color-blue {
color: blue;
}
.color-yellow {
color: yellow;
}
**Example:**

```svg
// SVG icon
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg">
<path stroke="currentColor" fill="none" d="..." />
^
</svg>
```

```jsx
import React, { Fragment } from 'react';
import Icon from 'react-icon-system';

const YourComponent = props => (
<Fragment>
<Icon src="alert" className="color-red" />
<Icon src="info" className="color-blue" />
<Icon src="warning" className="color-yellow" />
</Fragment>
)
// Code
import React from "react";
import Icon from "react-icon-system";

const YourComponent = () => (
<div>
<Icon src="alert" style={{ color: "red" }} />
<Icon src="info" style={{ color: "blue" }} />
<Icon src="warning" style={{ color: "yellow" }} />
</div>
);
```
21 changes: 0 additions & 21 deletions example/.gitignore

This file was deleted.

2,444 changes: 0 additions & 2,444 deletions example/README.md

This file was deleted.

21 changes: 0 additions & 21 deletions example/package.json

This file was deleted.

Binary file removed example/public/favicon.ico
Binary file not shown.
40 changes: 0 additions & 40 deletions example/public/index.html

This file was deleted.

15 changes: 0 additions & 15 deletions example/public/manifest.json

This file was deleted.

44 changes: 0 additions & 44 deletions example/src/App.css

This file was deleted.

26 changes: 0 additions & 26 deletions example/src/App.js

This file was deleted.

9 changes: 0 additions & 9 deletions example/src/App.test.js

This file was deleted.

1 change: 0 additions & 1 deletion example/src/images/icons/heart.svg

This file was deleted.

1 change: 0 additions & 1 deletion example/src/images/icons/home.svg

This file was deleted.

1 change: 0 additions & 1 deletion example/src/images/icons/inbox.svg

This file was deleted.

1 change: 0 additions & 1 deletion example/src/images/icons/monitor.svg

This file was deleted.

5 changes: 0 additions & 5 deletions example/src/index.css

This file was deleted.

8 changes: 0 additions & 8 deletions example/src/index.js

This file was deleted.

7 changes: 0 additions & 7 deletions example/src/logo.svg

This file was deleted.

0 comments on commit 526f578

Please sign in to comment.