Skip to content

Commit

Permalink
feat: Support TypeScript & React.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Feb 10, 2022
1 parent e7acaf4 commit 89178e0
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 62 deletions.
47 changes: 47 additions & 0 deletions .svgtofontrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"emptyDist": true,
"outSVGReact": true,
"outSVGPath": true,
"fontName": "btfont",
"css": true,
"startNumber": 20000,
"nodemo": true,
"svgicons2svgfont": {
"fontHeight": 1000,
"normalize": true
},
"website": {
"index": "symbol",
"title": "bootstrap-icons",
"logo": "assets/logo.svg",
"version": "v111",
"meta": {
"description": "Official open source SVG icon library for Bootstrap.",
"keywords": "Bootstrap,icon,bootstrap-icons,TTF,EOT,WOFF,WOFF2,SVG"
},
"description": "",
"links": [
{
"title": "GitHub",
"url": "https://github.com/uiwjs/bootstrap-icons"
},
{
"title": "Feedback",
"url": "https://github.com/uiwjs/bootstrap-icons/issues"
},
{
"title": "Font Class Demo",
"url": "font-class.html"
},
{
"title": "Symbol Demo",
"url": "index.html"
},
{
"title": "Unicode Demo",
"url": "unicode.html"
}
],
"footerInfo": "Licensed under MIT. (Yes it's free and <a href=\"https://github.com/uiwjs/bootstrap-icons\">open-sourced</a>)"
}
}
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,21 @@ Support for `.less` and `.css` styles references.
<i class="btfont-javascript"></i>
```

### React

Icons are used as components. `v1.3.0+` support.

```jsx
import { Activity, Wifi } from '@uiw/bootstrap-icons';

<Activity style={{ fill: 'red' }} />
<Wifi height="36" />
```

## Related

- [`@uiw/icons`](https://github.com/uiwjs/icons) The premium icon font for @uiwjs Component Library.

## License

Created By [svgtofont](https://github.com/jaywcjlove/svgtofont), Licensed under the [MIT License](https://opensource.org/licenses/MIT).
20 changes: 16 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
{
"name": "@uiw/bootstrap-icons",
"version": "1.2.0",
"version": "1.3.0",
"description": "Official open source SVG icon library for Bootstrap.",
"main": "index.js",
"main": "./lib/index.js",
"module": "./esm/index.js",
"types": "./esm/index.d.ts",
"scripts": {
"start": "node scripts/build.js"
"font": "svgtofont --sources icons/icons --output fonts",
"copy": "copyfiles -f fonts/react/*.d.ts lib --verbose && copyfiles -f fonts/react/*.d.ts esm --verbose",
"build": "tsbb build --entry fonts/react/index.js",
"start": "npm run font && npm run build && npm run copy"
},
"license": "MIT",
"author": "Kenny <wowohoo@qq.com>",
"repository": {
"type": "git",
"url": "https://github.com/uiwjs/bootstrap-icons.git"
},
"files": [
"fonts",
"esm",
"lib"
],
"keywords": [
"bootstrap",
"bootstrap-icons",
Expand All @@ -36,6 +46,8 @@
"base64"
],
"devDependencies": {
"svgtofont": "3.13.1"
"copyfiles": "2.4.1",
"svgtofont": "3.17.2",
"tsbb": "3.5.6"
}
}
58 changes: 0 additions & 58 deletions scripts/build.js

This file was deleted.

0 comments on commit 89178e0

Please sign in to comment.