Skip to content

Commit

Permalink
export Icon type (#1056)
Browse files Browse the repository at this point in the history
  • Loading branch information
codecalm committed Mar 13, 2024
1 parent a3200b5 commit 78ea72c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/icons-preact/src/tabler-icons-preact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 1 addition & 3 deletions packages/icons-react-native/src/tabler-icons-react-native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
2 changes: 1 addition & 1 deletion packages/icons-react/src/tabler-icons-react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
13 changes: 9 additions & 4 deletions packages/icons-solidjs/src/createSolidComponent.ts
Original file line number Diff line number Diff line change
@@ -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];
Expand Down
3 changes: 2 additions & 1 deletion packages/icons-solidjs/src/tabler-icons-solidjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
2 changes: 2 additions & 0 deletions packages/icons-vue/src/tabler-icons-vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

0 comments on commit 78ea72c

Please sign in to comment.