3.24.0 • Published 1 month ago

@s-ui/svg v3.24.0

Weekly downloads
48
License
MIT
Repository
-
Last release
1 month ago

sui-svg

Converts your SVG files into React Components wrapped with @s-ui/atom-icon.

Features:

  • Building the components
  • Showing up a demo locally

Installation

$ npm i -SE @s-ui/svg

Usage

Add bundling scripts to your package.json

{
  "name": "my-awesome-package",
  "version": "1.0.0",
  "scripts": {
    "prepublishOnly": "sui-svg build",
    "start": "npm run prepare && sui-svg demo"
  }
}

Expected folder structure

A src folder with all the .svg files to be converted inside.

Output

A lib folder with the generated components will be created/overridden.

⚠️ Advice: no index.js will be generated inside the lib folder, each component should be imported independently for performance reasons.

How to use the generated lib

import YourIcon from 'your-svg-repo/lib/YourIcon'

const YourAwesomeComponent = () =>
  <div>
    <YourIcon />
    <p>Awesome text/<p>
  </div>

Also, keep in mind, you need to import the needed styles for the icons at least once in your app:

@import 'your-svg-repo/lib/index';

Template

Every icon svg will be wrapped using an <AtomIcon> that means you could use all the props accepted by the component.

The wrapped code is minimal, in order to avoid performance penalties. You could check it here.

3.24.0

1 month ago

3.23.0-beta.0

1 month ago

3.22.0

9 months ago

3.23.0

8 months ago

3.20.0

2 years ago

3.19.0

2 years ago

3.18.1-beta.0

2 years ago

3.21.0

2 years ago

3.18.0

2 years ago

3.15.0

2 years ago

3.17.0

2 years ago

3.14.0

2 years ago

3.16.0

2 years ago

3.13.0

2 years ago

3.12.0

2 years ago

3.9.0

2 years ago

3.11.0

2 years ago

3.8.0

2 years ago

3.10.0

2 years ago

3.7.0

2 years ago

3.6.0

2 years ago

3.5.0

2 years ago

3.4.0

3 years ago

3.3.0

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.1-beta.0

3 years ago

3.0.1-beta.1

3 years ago

3.0.0

3 years ago

3.0.0-beta.0

3 years ago

3.0.0-alpha.6

3 years ago

3.0.0-alpha.5

3 years ago

3.0.0-alpha.4

3 years ago

3.0.0-alpha.3

3 years ago

3.0.0-alpha.1

3 years ago

3.0.0-alpha.2

3 years ago

3.0.0-alpha.0

3 years ago

2.11.0

3 years ago

2.10.0

3 years ago

2.9.0

3 years ago

2.8.0

3 years ago

2.7.0

3 years ago

2.6.0

4 years ago

2.5.0

4 years ago

2.4.0

4 years ago

2.3.0

4 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

2.0.0-beta.0

4 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.0

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.5.0-beta.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago