diff --git a/src/components/Bluelib.stories.jsx b/src/components/Bluelib.stories.jsx index 7cc719f..fd5528f 100644 --- a/src/components/Bluelib.stories.jsx +++ b/src/components/Bluelib.stories.jsx @@ -111,6 +111,14 @@ Sophon.args = { theme: "sophon", } + +export const GestioneAmber = Paper.bind({}) +GestioneAmber.args = { + ...Paper.args, + theme: "amber", +} + + export const CustomRed = Paper.bind({}) CustomRed.args = { ...Paper.args, diff --git a/src/components/Bluelib.tsx b/src/components/Bluelib.tsx index 3c30e92..49539cd 100644 --- a/src/components/Bluelib.tsx +++ b/src/components/Bluelib.tsx @@ -1,5 +1,6 @@ import * as React from "react" import * as ReactDOM from "react-dom" +import {BluelibTheme, BluelibThemes} from "../types" import * as Types from "../types" import * as Colors from "../utils/Colors" import Color from "color" @@ -9,6 +10,7 @@ import PaperTheme from "../bluelib/src/targets/paper.module.css" import RoyalBlueTheme from "../bluelib/src/targets/royalblue.module.css" import HackerTheme from "../bluelib/src/targets/hacker.module.css" import SophonTheme from "../bluelib/src/targets/sophon.module.css" +import GestioneAmberTheme from "../bluelib/src/targets/amber.module.css" const BuiltinThemes = { @@ -16,11 +18,12 @@ const BuiltinThemes = { "royalblue": RoyalBlueTheme, "hacker": HackerTheme, "sophon": SophonTheme, + "amber": GestioneAmberTheme, } export interface BluelibProps extends Types.BluelibHTMLProps { - theme: "paper" | "royalblue" | "hacker" | "sophon", + theme: BluelibTheme, backgroundColor?: typeof Color, foregroundColor?: typeof Color, diff --git a/src/types.ts b/src/types.ts index a4dd351..17161bd 100644 --- a/src/types.ts +++ b/src/types.ts @@ -44,3 +44,9 @@ export type Validity = boolean | null | undefined * Bluelib's builtin colors, as strings. */ export type BuiltinColor = "red" | "orange" | "yellow" | "lime" | "cyan" | "blue" | "magenta" | "gray" + + +/** + * Bluelib default themes, as strings. + */ +export type BluelibTheme = "royalblue" | "sophon" | "hacker" | "paper" | "amber" \ No newline at end of file