diff --git a/.changeset/slimy-buckets-own.md b/.changeset/slimy-buckets-own.md new file mode 100644 index 0000000..ecb5d47 --- /dev/null +++ b/.changeset/slimy-buckets-own.md @@ -0,0 +1,5 @@ +--- +"@qwqui/tools": major +--- + +Add props type diff --git a/packages/tools/index.ts b/packages/tools/index.ts index ddb9d54..95775b3 100644 --- a/packages/tools/index.ts +++ b/packages/tools/index.ts @@ -1,2 +1,3 @@ export * from './factory'; -export * from './resolveCssVar'; \ No newline at end of file +export * from './resolveCssVar'; +export * from './props-type'; \ No newline at end of file diff --git a/packages/tools/props-type.ts b/packages/tools/props-type.ts new file mode 100644 index 0000000..43ebfe8 --- /dev/null +++ b/packages/tools/props-type.ts @@ -0,0 +1,13 @@ +import { CSSProperties, ReactNode } from "react"; + +export type DefaultPropType = { + w: number; + h: number; + className: string; + style: CSSProperties; + children: ReactNode; +} & {} + +export type PropsType = T & DefaultPropType +export type PropsTypeOptional = Partial +export type PropsTypePartialDefault = T & Partial; \ No newline at end of file