1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-12-22 19:44:21 +00:00

Add support for amber, the Gestione Amber theme

This commit is contained in:
Steffo 2021-10-15 04:53:09 +02:00
parent 9df7d5fad6
commit 37ea06a0e6
Signed by: steffo
GPG key ID: 6965406171929D01
3 changed files with 18 additions and 1 deletions

View file

@ -111,6 +111,14 @@ Sophon.args = {
theme: "sophon", theme: "sophon",
} }
export const GestioneAmber = Paper.bind({})
GestioneAmber.args = {
...Paper.args,
theme: "amber",
}
export const CustomRed = Paper.bind({}) export const CustomRed = Paper.bind({})
CustomRed.args = { CustomRed.args = {
...Paper.args, ...Paper.args,

View file

@ -1,5 +1,6 @@
import * as React from "react" import * as React from "react"
import * as ReactDOM from "react-dom" import * as ReactDOM from "react-dom"
import {BluelibTheme, BluelibThemes} from "../types"
import * as Types from "../types" import * as Types from "../types"
import * as Colors from "../utils/Colors" import * as Colors from "../utils/Colors"
import Color from "color" 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 RoyalBlueTheme from "../bluelib/src/targets/royalblue.module.css"
import HackerTheme from "../bluelib/src/targets/hacker.module.css" import HackerTheme from "../bluelib/src/targets/hacker.module.css"
import SophonTheme from "../bluelib/src/targets/sophon.module.css" import SophonTheme from "../bluelib/src/targets/sophon.module.css"
import GestioneAmberTheme from "../bluelib/src/targets/amber.module.css"
const BuiltinThemes = { const BuiltinThemes = {
@ -16,11 +18,12 @@ const BuiltinThemes = {
"royalblue": RoyalBlueTheme, "royalblue": RoyalBlueTheme,
"hacker": HackerTheme, "hacker": HackerTheme,
"sophon": SophonTheme, "sophon": SophonTheme,
"amber": GestioneAmberTheme,
} }
export interface BluelibProps extends Types.BluelibHTMLProps<HTMLDivElement> { export interface BluelibProps extends Types.BluelibHTMLProps<HTMLDivElement> {
theme: "paper" | "royalblue" | "hacker" | "sophon", theme: BluelibTheme,
backgroundColor?: typeof Color, backgroundColor?: typeof Color,
foregroundColor?: typeof Color, foregroundColor?: typeof Color,

View file

@ -44,3 +44,9 @@ export type Validity = boolean | null | undefined
* Bluelib's builtin colors, as strings. * Bluelib's builtin colors, as strings.
*/ */
export type BuiltinColor = "red" | "orange" | "yellow" | "lime" | "cyan" | "blue" | "magenta" | "gray" export type BuiltinColor = "red" | "orange" | "yellow" | "lime" | "cyan" | "blue" | "magenta" | "gray"
/**
* Bluelib default themes, as strings.
*/
export type BluelibTheme = "royalblue" | "sophon" | "hacker" | "paper" | "amber"