feat(types): loosen type for Carbon icons #806

This commit is contained in:
metonym 2021-10-15 07:53:58 -07:00
commit fcfe3c3ae4
37 changed files with 160 additions and 153 deletions

View file

@ -47,7 +47,7 @@ export interface ButtonProps
/**
* Specify the icon from `carbon-icons-svelte` to render
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Specify the ARIA label for the button icon

View file

@ -25,7 +25,7 @@ export interface ContextMenuOptionProps
* Specify the icon from `carbon-icons-svelte` to render
* Icon is rendered to the left of the label text
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Specify the label text

View file

@ -8,7 +8,7 @@ export interface IconProps
/**
* Specify the icon from `carbon-icons-svelte` to render
*/
render?: typeof import("carbon-icons-svelte").CarbonIcon;
render?: typeof import("svelte").SvelteComponent;
/**
* Set to `true` to display the skeleton state

View file

@ -23,7 +23,7 @@ export interface LinkProps
* Specify the icon from `carbon-icons-svelte` to render
* `inline` must be `false`
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Set to `true` to disable the checkbox

View file

@ -12,7 +12,7 @@ export interface NotificationButtonProps
/**
* Specify the icon from `carbon-icons-svelte` to render
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Specify the title of the icon

View file

@ -40,7 +40,7 @@ export interface OverflowMenuProps
/**
* Specify the icon from `carbon-icons-svelte` to render
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Specify the icon class

View file

@ -94,7 +94,7 @@ export interface SearchProps {
/**
* Specify the icon from `carbon-icons-svelte` to render
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Set an id for the input element

2
types/Tag/Tag.d.ts vendored
View file

@ -58,7 +58,7 @@ export interface TagProps
/**
* Specify the icon from `carbon-icons-svelte` to render
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Set an id for the filterable tag

View file

@ -31,7 +31,7 @@ export interface TooltipProps
* Specify the icon from `carbon-icons-svelte` to render for the tooltip button
* Icon size must be 16px (e.g., `Add16`, `Task16`)
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Specify the ARIA label for the tooltip button

View file

@ -13,7 +13,7 @@ export interface TooltipIconProps
/**
* Specify the icon from `carbon-icons-svelte` to render
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Set to `true` to disable the tooltip icon

View file

@ -65,13 +65,13 @@ export interface HeaderProps
* Specify the icon from `carbon-icons-svelte` to render for the closed state
* Defaults to `Menu20`
*/
iconMenu?: typeof import("carbon-icons-svelte").CarbonIcon;
iconMenu?: typeof import("svelte").SvelteComponent;
/**
* Specify the icon from `carbon-icons-svelte` to render for the opened state
* Defaults to `Close20`
*/
iconClose?: typeof import("carbon-icons-svelte").CarbonIcon;
iconClose?: typeof import("svelte").SvelteComponent;
}
export default class Header extends SvelteComponentTyped<

View file

@ -18,7 +18,7 @@ export interface HeaderActionProps
/**
* Specify the icon from `carbon-icons-svelte` to render
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Specify the close icon from `carbon-icons-svelte` to render

View file

@ -17,7 +17,7 @@ export interface HeaderActionLinkProps
/**
* Specify the icon from `carbon-icons-svelte` to render
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Obtain a reference to the HTML anchor element

View file

@ -12,7 +12,7 @@ export interface HeaderGlobalActionProps
/**
* Specify the icon to render
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Obtain a reference to the HTML button element

View file

@ -22,7 +22,7 @@ export interface SideNavLinkProps
/**
* Specify the icon from `carbon-icons-svelte` to render
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Obtain a reference to the HTML anchor element

View file

@ -17,7 +17,7 @@ export interface SideNavMenuProps
/**
* Specify the icon from `carbon-icons-svelte` to render
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
icon?: typeof import("svelte").SvelteComponent;
/**
* Obtain a reference to the HTML button element