fix(ui): fix Icon typing
This commit is contained in:
parent
ee065619ba
commit
5bf2d1008b
6 changed files with 21 additions and 5 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import React from 'react';
|
||||
import cn from 'classnames';
|
||||
import SVG from 'UI/SVG';
|
||||
import SVG, { IconNames } from 'UI/SVG';
|
||||
import styles from './icon.module.css';
|
||||
|
||||
interface IProps {
|
||||
name: string
|
||||
interface IProps {
|
||||
name: IconNames
|
||||
size?: number | string
|
||||
height?: number
|
||||
width?: number
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
3
frontend/app/svg/icons/funnel-new.svg
Normal file
3
frontend/app/svg/icons/funnel-new.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-funnel" viewBox="0 0 16 16">
|
||||
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2h-11z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 382 B |
3
frontend/app/svg/icons/graph-up.svg
Normal file
3
frontend/app/svg/icons/graph-up.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-graph-up" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M0 0h1v15h15v1H0V0Zm14.817 3.113a.5.5 0 0 1 .07.704l-4.5 5.5a.5.5 0 0 1-.74.037L7.06 6.767l-3.656 5.027a.5.5 0 0 1-.808-.588l4-5.5a.5.5 0 0 1 .758-.06l2.609 2.61 4.15-5.073a.5.5 0 0 1 .704-.07Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 339 B |
3
frontend/app/svg/icons/table-new.svg
Normal file
3
frontend/app/svg/icons/table-new.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-table" viewBox="0 0 16 16">
|
||||
<path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm15 2h-4v3h4V4zm0 4h-4v3h4V8zm0 4h-4v3h3a1 1 0 0 0 1-1v-2zm-5 3v-3H6v3h4zm-5 0v-3H1v2a1 1 0 0 0 1 1h3zm-4-4h4V8H1v3zm0-4h4V4H1v3zm5-3v3h4V4H6zm4 4H6v3h4V8z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 349 B |
|
|
@ -68,8 +68,10 @@ const plugins = (removeFill = true) => {
|
|||
fs.writeFileSync(`${UI_DIRNAME}/SVG.tsx`, `
|
||||
import React from 'react';
|
||||
|
||||
export type IconNames = ${icons.map(icon => "'"+ icon.slice(0, -4) + "'").join(' | ')};
|
||||
|
||||
interface Props {
|
||||
name: string;
|
||||
name: IconNames;
|
||||
size?: number | string;
|
||||
width?: number | string;
|
||||
height?: number | string;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue