Skip to content

Commit 7bbf556

Browse files
authored
Remove outdated SVG-handling info
1 parent 39fbb11 commit 7bbf556

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

README.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,18 @@ You can also create additional sub-components in any existing directory by runni
1919
You can then modify the component and demo code as needed.
2020
Your new component can be viewed at `http://localhost:5010/#/components/my-new-component` while the demo server is running.
2121

22-
### Running the demo server locally
23-
24-
Start up the demo server by running
25-
```sh
26-
make dev-server
27-
```
28-
29-
### SVG components
30-
31-
* In this repository, we prefer to use SVG React components rather than
32-
linking to true svg images. In order to convert `.svg` files to React components, the [`svg-to-react-cli` NPM library](https://www.npmjs.com/package/svg-to-react-cli)
33-
is very useful, but it is not perfect. It doesn't properly handle a few
34-
attributes, which can be fixed by find-replaces across files. For example:
35-
* `xmlns:xlink` should be `xmlnsXlink`
36-
* `stroke-width` should be `strokeWidth`
37-
38-
### Adding new Icons
22+
### Adding new SVGs
3923
We use SVGs as JSX components for `Icon`s, following this process:
4024
1. Optimize the svg at [svgomg](https://jakearchibald.github.io/svgomg/)
4125
2. Make it React compatible with double quotes option at [svg2jsx](http://svg2jsx.herokuapp.com/)
4226
3. Prefix DOM Ids and classnames with component name if necessary
4327
4. Add it to the code:
4428
* Create a new file in `src/Icon/icons/<<NewIcon>>.jsx`
4529
* Add to `src/Icon/icons/index.jsx` and `src/Icon/Icon.jsx`
30+
31+
### Running the demo server locally
32+
33+
Start up the demo server by running
34+
```sh
35+
make dev-server
36+
```

0 commit comments

Comments
 (0)