@oslokommune/punkt-elements
Version:
Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo
7 lines (6 loc) • 353 B
TypeScript
/**
* We define all props as optional. Native HTML attributes are optional by default,
* but the TS definition require either null or value. This way we can support showing a value as optional
* and define a default value on the element itself
*/
export type ElementProps<Element, PropKeys extends keyof Element> = Partial<Pick<Element, PropKeys>>;