@itwin/itwinui-react
Version:
A react component library for iTwinUI
21 lines (20 loc) • 1.5 kB
TypeScript
export declare const SoftBackgrounds: {
readonly skyblue: "var(--iui-color-background-skyblue)";
readonly celery: "var(--iui-color-background-celery)";
readonly froly: "var(--iui-color-background-froly)";
readonly steelblue: "var(--iui-color-background-steelblue)";
readonly sunglow: "var(--iui-color-background-sunglow)";
readonly seabuckthorn: "var(--iui-color-background-seabuckthorn)";
readonly montecarlo: "var(--iui-color-background-montecarlo)";
readonly poloblue: "var(--iui-color-background-poloblue)";
readonly bouquet: "var(--iui-color-background-bouquet)";
readonly ash: "var(--iui-color-background-ash)";
readonly oak: "var(--iui-color-background-oak)";
};
/** Returns true if a string value is one of the SoftBackgrounds keys */
export declare const isSoftBackground: (value: string) => value is keyof typeof SoftBackgrounds;
/**
* Generate color from user name or email.
* Recommended to use for `backgroundColor` in `Avatar` component.
*/
export declare const getUserColor: (emailOrName: string) => "var(--iui-color-background-skyblue)" | "var(--iui-color-background-celery)" | "var(--iui-color-background-froly)" | "var(--iui-color-background-steelblue)" | "var(--iui-color-background-sunglow)" | "var(--iui-color-background-seabuckthorn)" | "var(--iui-color-background-montecarlo)" | "var(--iui-color-background-poloblue)" | "var(--iui-color-background-bouquet)" | "var(--iui-color-background-ash)" | "var(--iui-color-background-oak)";