add Icons to webpack commons
This commit is contained in:
parent
65c5897dc3
commit
8afd79dd50
|
@ -28,6 +28,8 @@ export let Forms = {} as {
|
|||
FormText: t.FormText,
|
||||
};
|
||||
|
||||
export let Icons = {} as t.Icons;
|
||||
|
||||
export let Card: t.Card;
|
||||
export let Button: t.Button;
|
||||
export let Switch: t.Switch;
|
||||
|
@ -85,4 +87,5 @@ waitFor(["FormItem", "Button"], m => {
|
|||
Heading
|
||||
} = m);
|
||||
Forms = m;
|
||||
Icons = m;
|
||||
});
|
||||
|
|
9
src/webpack/common/types/components.d.ts
vendored
9
src/webpack/common/types/components.d.ts
vendored
|
@ -18,6 +18,8 @@
|
|||
|
||||
import type { ComponentType, CSSProperties, FunctionComponent, HtmlHTMLAttributes, HTMLProps, KeyboardEvent, MouseEvent, PropsWithChildren, PropsWithRef, ReactNode, Ref } from "react";
|
||||
|
||||
import { IconNames } from "./iconNames";
|
||||
|
||||
export type TextVariant = "heading-sm/normal" | "heading-sm/medium" | "heading-sm/semibold" | "heading-sm/bold" | "heading-md/normal" | "heading-md/medium" | "heading-md/semibold" | "heading-md/bold" | "heading-lg/normal" | "heading-lg/medium" | "heading-lg/semibold" | "heading-lg/bold" | "heading-xl/normal" | "heading-xl/medium" | "heading-xl/bold" | "heading-xxl/normal" | "heading-xxl/medium" | "heading-xxl/bold" | "eyebrow" | "heading-deprecated-14/normal" | "heading-deprecated-14/medium" | "heading-deprecated-14/bold" | "text-xxs/normal" | "text-xxs/medium" | "text-xxs/semibold" | "text-xxs/bold" | "text-xs/normal" | "text-xs/medium" | "text-xs/semibold" | "text-xs/bold" | "text-sm/normal" | "text-sm/medium" | "text-sm/semibold" | "text-sm/bold" | "text-md/normal" | "text-md/medium" | "text-md/semibold" | "text-md/bold" | "text-lg/normal" | "text-lg/medium" | "text-lg/semibold" | "text-lg/bold" | "display-sm" | "display-md" | "display-lg" | "code";
|
||||
export type FormTextTypes = Record<"DEFAULT" | "INPUT_PLACEHOLDER" | "DESCRIPTION" | "LABEL_BOLD" | "LABEL_SELECTED" | "LABEL_DESCRIPTOR" | "ERROR" | "SUCCESS", string>;
|
||||
export type HeadingTag = `h${1 | 2 | 3 | 4 | 5 | 6}`;
|
||||
|
@ -502,3 +504,10 @@ export type Avatar = ComponentType<PropsWithChildren<{
|
|||
type FocusLock = ComponentType<PropsWithChildren<{
|
||||
containerRef: RefObject<HTMLElement>;
|
||||
}>>;
|
||||
|
||||
export type Icon = ComponentType<JSX.IntrinsicElements["svg"] & {
|
||||
size?: string;
|
||||
colorClass?: string;
|
||||
} & Record<string, any>>;
|
||||
|
||||
export type Icons = Record<IconNames, Icon>;
|
||||
|
|
14
src/webpack/common/types/iconNames.d.ts
vendored
Normal file
14
src/webpack/common/types/iconNames.d.ts
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue