Socket
Socket
Sign inDemoInstall

@uiw/react-icon

Package Overview
Dependencies
Maintainers
2
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-icon - npm Package Compare versions

Comparing version 4.21.23 to 5.0.0-bate.2.0

cjs/style/index.d.ts

6

cjs/index.d.ts
import React from 'react';
import svgPaths from '@uiw/icons/fonts/w-icon.json';
import './style/index.less';
export * from './style';
export declare type IconsName = keyof typeof svgPaths;

@@ -20,3 +20,3 @@ declare type TagType = React.ComponentType | keyof JSX.IntrinsicElements;

}
export default function Icon<Tag extends TagType = 'span'>(props: IconProps<Tag>): React.ReactElement<{}, string | React.JSXElementConstructor<any>> | null;
export {};
export default function Icon<Tag extends TagType = 'span'>(props: IconProps<Tag>): React.DOMElement<any, Element> | null;
//# sourceMappingURL=index.d.ts.map

@@ -7,2 +7,3 @@ "use strict";

});
var _exportNames = {};
exports["default"] = Icon;

@@ -13,2 +14,14 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));

var _wIcon = _interopRequireDefault(require("@uiw/icons/fonts/w-icon.json"));
var _style = require("./style");
Object.keys(_style).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _style[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _style[key];
}
});
});
var _jsxRuntime = require("react/jsx-runtime");

@@ -54,5 +67,8 @@ var _excluded = ["className", "prefixCls", "verticalAlign", "tagName", "color", "type", "spin"];

});
return /*#__PURE__*/_react["default"].createElement(TagName, (0, _objectSpread2["default"])({}, propps), svg);
return /*#__PURE__*/_react["default"].createElement(_style.IconStyleBase, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, propps), {}, {
verticalAlign: verticalAlign,
spin: spin,
as: TagName
}), svg);
}
module.exports = exports.default;
//# sourceMappingURL=index.js.map
import React from 'react';
import svgPaths from '@uiw/icons/fonts/w-icon.json';
import './style/index.less';
export * from './style';
export declare type IconsName = keyof typeof svgPaths;

@@ -20,3 +20,3 @@ declare type TagType = React.ComponentType | keyof JSX.IntrinsicElements;

}
export default function Icon<Tag extends TagType = 'span'>(props: IconProps<Tag>): React.ReactElement<{}, string | React.JSXElementConstructor<any>> | null;
export {};
export default function Icon<Tag extends TagType = 'span'>(props: IconProps<Tag>): React.DOMElement<any, Element> | null;
//# sourceMappingURL=index.d.ts.map

@@ -6,4 +6,5 @@ import _extends from "@babel/runtime/helpers/extends";

import svgPaths from '@uiw/icons/fonts/w-icon.json';
import "./style/index.css";
import { IconStyleBase } from './style';
import { jsx as _jsx } from "react/jsx-runtime";
export * from './style';
export default function Icon(props) {

@@ -43,4 +44,8 @@ var {

});
return /*#__PURE__*/React.createElement(TagName, _extends({}, propps), svg);
return /*#__PURE__*/React.createElement(IconStyleBase, _extends({}, propps, {
verticalAlign,
spin,
as: TagName
}), svg);
}
//# sourceMappingURL=index.js.map
{
"name": "@uiw/react-icon",
"version": "4.21.23",
"version": "5.0.0-bate.2.0",
"description": "Icon component",

@@ -44,7 +44,8 @@ "author": "Kenny Wong <wowohoo@qq.com>",

"react": ">=16.9.0",
"react-dom": ">=16.9.0"
"react-dom": ">=16.9.0",
"styled-components": ">=5.3.5"
},
"dependencies": {
"@uiw/icons": "~2.6.0"
"@uiw/icons": "2.6.1"
}
}

@@ -18,3 +18,3 @@ Icon 图标

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&noCode=true&codeSandbox=true&codePen=true
import React from 'react';

@@ -47,3 +47,3 @@ import { Input, CopyToClipboard, Icon, Notify } from 'uiw';

<div>
<Input preIcon="search" placeholder="请输入图标名称" type="text" style={{ maxWidth: 200 }} onChange={this.onChange.bind(this)} />
<Input preIcon={<Icon type="search" />} placeholder="请输入图标名称" type="text" style={{ maxWidth: 200 }} onChange={this.onChange.bind(this)} />
<div style={{ padding: '10px 0' }}>

@@ -83,4 +83,3 @@ 搜索到 {this.state.len} 个结果{len > 0 && <span>,下面展示 {len > 15 ? '15' : len} 个图标,可以点击复制图标代码: </span>}

}
export default Demo;
export default Demo
```

@@ -125,15 +124,15 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';
export default function Demo() {
return (
<div style={{ fontSize: 18, lineHeight: '12px' }}>
<Icon type="heart-on" />
<Icon type="pie-chart" />
<Icon type="tag" />
</div>
);
}
const Demo =()=>(
<div style={{ fontSize: 18, lineHeight: '12px' }}>
<Icon type="heart-on" />
<Icon type="pie-chart" />
<Icon type="tag" />
</div>
);
export default Demo
```

@@ -145,15 +144,14 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';
export default function Demo() {
return (
<div style={{ fontSize: '28px' }}>
<Icon type="heart-on" />
<Icon type="pie-chart" />
<Icon type="tag" />
</div>
);
}
const Demo = () => (
<div style={{ fontSize: '28px' }}>
<Icon type="heart-on" />
<Icon type="pie-chart" />
<Icon type="tag" />
</div>
);
export default Demo
```

@@ -168,16 +166,15 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';
export default function Demo() {
return (
<div style={{ fontSize: '28px',color: 'green' }}>
<Icon type="apple" color="red" />
<Icon type="pie-chart" style={{fill: 'currentColor'}} />
<Icon type="frown" style={{fill: 'blue'}} />
<Icon type="uiw" style={{stroke: 'red',fill: '#ffef00'}} />
</div>
);
}
const Demo = () => (
<div style={{ fontSize: '28px',color: 'green' }}>
<Icon type="apple" color="red" />
<Icon type="pie-chart" style={{fill: 'currentColor'}} />
<Icon type="frown" style={{fill: 'blue'}} />
<Icon type="uiw" style={{stroke: 'red',fill: '#ffef00'}} />
</div>
);
export default Demo
```

@@ -187,14 +184,13 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';
export default function Demo() {
return (
<div>
<h3 style={{ margin: 0 }}>Exit <Icon verticalAlign="baseline" type="baidu" /></h3>
<span>uiw</span><Icon type="uiw" verticalAlign="baseline" style={{ fill: '#009688', fontSize: 21 }} />
</div>
);
}
const Demo = () => (
<div>
<h3 style={{ margin: 0 }}>Exit <Icon verticalAlign="baseline" type="baidu" /></h3>
<span>uiw</span><Icon type="uiw" verticalAlign="baseline" style={{ fill: '#009688', fontSize: 21 }} />
</div>
);
export default Demo
```

@@ -206,21 +202,20 @@

> \[形状?\]-\[图标名\]-\[描线?\]-\[方向?\]
> 方向:`down`、`up`、`left`、`right`
> 描线:`-o` 图标添加边框描线
> 默认:`w-icon-` 默认引用的字体文件作用域
> 自定定义:`w-icon-uiw-` 自定定义作用域
> \[形状?\]-\[图标名\]-\[描线?\]-\[方向?\]
> 方向:`down`、`up`、`left`、`right`
> 描线:`-o` 图标添加边框描线
> 默认:`w-icon-` 默认引用的字体文件作用域
> 自定定义:`w-icon-uiw-` 自定定义作用域
```jsx mdx:preview&bg=#fff
import React from 'react';
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';
export default function Demo() {
return (
<div>
<Icon type="circle-close" verticalAlign="baseline" /> 图标名称:circle-close,[circle圈]-[关闭close]
<br/>
<Icon type="circle-close-o" verticalAlign="baseline" /> 图标名称:circle-close-o,[circle圈]-[关闭close]-[o描线]
</div>
);
}
const Demo = () => (
<div>
<Icon type="circle-close" verticalAlign="baseline" /> 图标名称:circle-close,[circle圈]-[关闭close]
<br/>
<Icon type="circle-close-o" verticalAlign="baseline" /> 图标名称:circle-close-o,[circle圈]-[关闭close]-[o描线]
</div>
);
export default Demo
```

@@ -232,16 +227,15 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';
export default function Demo() {
return (
<div style={{ fontSize: 21, color: 'green' }}>
<Icon type="loading" spin={true} color="red" />
<Icon type="reload" spin={true} />
<Icon type="picasa" spin={true} style={{fill: 'blue'}} />
<Icon type="smile-o" spin={true} style={{fill: 'blue'}} />
</div>
);
}
const Demo = () => (
<div style={{ fontSize: 21, color: 'green' }}>
<Icon type="loading" spin={true} color="red" />
<Icon type="reload" spin={true} />
<Icon type="picasa" spin={true} style={{fill: 'blue'}} />
<Icon type="smile-o" spin={true} style={{fill: 'blue'}} />
</div>
);
export default Demo
```

@@ -251,4 +245,4 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';

@@ -268,10 +262,9 @@

export default function Demo() {
return (
<div style={{ fontSize: 21, color: 'green' }}>
<Icon style={styl} type={chat} color="red" />
<Icon style={styl} type={contrast} spin={true} />
</div>
);
}
const Demo = () => (
<div style={{ fontSize: 21, color: 'green' }}>
<Icon style={styl} type={chat} color="red" />
<Icon style={styl} type={contrast} spin={true} />
</div>
);
export default Demo
```

@@ -325,5 +318,4 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```js mdx:preview&background=#fff&noCode=true&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';

@@ -339,16 +331,15 @@

export default function Demo() {
return (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
}
const Demo = () => (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
export default Demo
```

@@ -358,4 +349,4 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```js mdx:preview&background=#fff&noCode=true&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';

@@ -370,17 +361,15 @@

}
export default function Demo() {
return (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
}
const Demo = () => (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
export default Demo
```

@@ -390,4 +379,4 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```js mdx:preview&background=#fff&noCode=true&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';

@@ -406,16 +395,15 @@

export default function Demo() {
return (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
}
const Demo = () => (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
export default Demo
```

@@ -425,9 +413,8 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```js mdx:preview&background=#fff&noCode=true&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';
const iconList = [
'smile-o', 'smile','frown-o', 'frown', 'meh-o', 'meh',
'smile-o', 'smile','frown-o', 'frown', 'meh-o', 'meh',
'pause-circle-o', 'pause', 'pause-circle', 'information-o', 'information', 'warning-o', 'warning',

@@ -441,16 +428,15 @@ 'question-circle-o', 'question-circle', 'stop-o', 'stop',

export default function Demo() {
return (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
}
const Demo = () => (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
export default Demo
```

@@ -460,4 +446,4 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```js mdx:preview&background=#fff&noCode=true&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';

@@ -467,3 +453,3 @@

'plus', 'plus-circle-o','plus-circle', 'plus-square', 'plus-square-o',
'minus', 'minus-circle-o', 'minus-circle', 'minus-square', 'minus-square-o',
'minus', 'minus-circle-o', 'minus-circle', 'minus-square', 'minus-square-o',
'close','circle-close-o', 'circle-close','close-square', 'close-square-o', 'asterisk',

@@ -477,16 +463,15 @@ 'check', 'circle-check-o', 'circle-check','check-square','check-square-o', 'copyright',

export default function Demo() {
return (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
}
const Demo = () => (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
export default Demo
```

@@ -496,5 +481,4 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```js mdx:preview&background=#fff&noCode=true&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';

@@ -504,3 +488,3 @@

'file-text', 'file-jpg', 'file-unknown', 'file-add', 'file-excel', 'file-pdf',
'folder-add', 'folder-open', 'paper-clip',
'folder-add', 'folder-open', 'paper-clip',
]

@@ -512,16 +496,15 @@ const itemStyl = {

export default function Demo() {
return (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
}
const Demo = () => (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
export default Demo
```

@@ -531,4 +514,4 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```js mdx:preview&background=#fff&noCode=true&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';

@@ -551,16 +534,15 @@

export default function Demo() {
return (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
}
const Demo = () => (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
export default Demo
```

@@ -570,4 +552,4 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```js mdx:preview&background=#fff&noCode=true&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';

@@ -582,16 +564,15 @@

export default function Demo() {
return (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
}
const Demo = () => (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
export default Demo
```

@@ -601,4 +582,4 @@

```jsx mdx:preview&bg=#fff
import React from 'react';
```js mdx:preview&background=#fff&noCode=true&codeSandbox=true&codePen=true
import React from "react"
import { Icon } from 'uiw';

@@ -612,16 +593,15 @@

export default function Demo() {
return (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
}
const Demo = () => (
<div style={{ display: 'flex', flexWrap: 'wrap', marginBottom: -10, marginRight: -10 }}>
{iconList.map((type, idx) => {
return (
<div key={idx} style={itemStyl}>
<Icon type={type} />
<div style={{ color: '#525252', fontSize: 12, paddingTop: 8 }}>{type}</div>
</div>
)
})}
</div>
);
export default Demo
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc