1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-08-01 11:50:25 +02:00

export Icon type (#1056)

This commit is contained in:
Paweł Kuna
2024-03-14 00:35:44 +01:00
committed by GitHub
parent a3200b5831
commit 78ea72c2c8
6 changed files with 16 additions and 10 deletions

View File

@@ -5,4 +5,4 @@ export * from './aliases';
export { default as createReactComponent } from './createPreactComponent';
export type { IconNode, IconProps, Icon } from './types';
export type { Icon, IconNode, IconProps } from './types';

View File

@@ -4,6 +4,4 @@ export * as iconsList from './icons-list';
export * from './aliases';
export { default as createReactComponent } from './createReactNativeComponent';
export type { IconNode, IconProps, Icon } from './types';
export type { Icon, IconNode, IconProps } from './types';

View File

@@ -4,4 +4,4 @@ export * as iconsList from './icons-list';
export * from './aliases';
export { default as createReactComponent } from './createReactComponent';
export type { IconNode, IconProps } from './types';
export type { Icon, IconNode, IconProps } from './types';

View File

@@ -1,9 +1,14 @@
import defaultAttributes from './defaultAttributes'
import { splitProps } from "solid-js"
import h from "solid-js/h";
import defaultAttributes from './defaultAttributes';
import { splitProps } from 'solid-js';
import h from 'solid-js/h';
import { IconNode, IconProps } from './types';
const createSolidComponent = (type: 'outline' | 'filled',iconName: string, iconNamePascal: string, iconNode: IconNode) => {
const createSolidComponent = (
type: 'outline' | 'filled',
iconName: string,
iconNamePascal: string,
iconNode: IconNode,
) => {
const Component = (props: IconProps) => {
const [localProps, rest] = splitProps(props, ['color', 'size', 'stroke', 'children', 'class']),
attributes = defaultAttributes[type];

View File

@@ -2,5 +2,6 @@ export * from './icons/index';
export * as icons from './icons/index';
export * as iconsList from './icons-list';
export * from './aliases';
export { default as createSolidComponent } from './createSolidComponent';
export type { IconNode, IconProps } from './types';

View File

@@ -4,3 +4,5 @@ export * as iconsList from './icons-list';
export * from './aliases';
export { default as createVueComponent } from './createVueComponent';
export type { Icon, IconNode, IconProps } from './types';