1.1.0 • Published 1 year ago
@hdoc-react/type-utils v1.1.0
@hdoc-react/type-utils
Type utilities used by component packages of @hdoc-react/components
Installation
npm install @hdoc-react/type-utils
Usage
import type { Simplify } from "@hdoc-react/type-utils";
type MyType = {
a: number;
b: string;
};
type AnotherType = {
c: boolean;
d: number;
};
type FlattenedType = Simplify<MyType & AnotherType>;
API
Utilities
Simplify
- Use to flatten the type output to improve type hints shown in editors.
Common Props
These are common props
that can be used in any
component.
Color
- Color variantsSize
- Size variants