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:
@@ -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';
|
||||
|
@@ -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';
|
||||
|
@@ -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';
|
||||
|
@@ -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];
|
||||
|
@@ -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';
|
||||
|
@@ -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';
|
||||
|
Reference in New Issue
Block a user