1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-09-02 18:33:18 +02:00

Merge remote-tracking branch 'origin/master'

This commit is contained in:
codecalm
2022-09-21 23:59:47 +02:00
2 changed files with 6 additions and 2 deletions

View File

@@ -680,7 +680,7 @@ gulp.task('svg-to-react', gulp.series('clean-react', async (cb) => {
}
let indexCode = '',
indexDCode = `import { FC, SVGAttributes } from 'react';\n\ninterface TablerIconProps extends SVGAttributes<SVGElement> { color?: string; size?: string | number; stroke?: string | number; }\n\ntype TablerIcon = FC<TablerIconProps>;\n\n`
indexDCode = `import { FC, SVGAttributes } from 'react';\n\ntype TablerIconProps = Omit<SVGAttributes<SVGElement>, 'color' | 'stroke'> & {\n color?: SVGAttributes<SVGElement>['stroke'];\n size?: SVGAttributes<SVGElement>['width'];\n stroke?: SVGAttributes<SVGElement>['strokeWidth'];\n}\n\ntype TablerIcon = FC<TablerIconProps>;\n\n`
await asyncForEach(files, async function(file) {
const svgCode = optimizeSvgCode(fs.readFileSync(file).toString()),

View File

@@ -1,6 +1,10 @@
import { FC, SVGAttributes } from 'react';
interface TablerIconProps extends SVGAttributes<SVGElement> { color?: string; size?: string | number; stroke?: string | number; }
type TablerIconProps = Omit<SVGAttributes<SVGElement>, 'color' | 'stroke'> & {
color?: SVGAttributes<SVGElement>['stroke'];
size?: SVGAttributes<SVGElement>['width'];
stroke?: SVGAttributes<SVGElement>['strokeWidth'];
}
type TablerIcon = FC<TablerIconProps>;