Express workspace in terms of new components

Co-Authored-By: Nate Butler <1714999+iamnbutler@users.noreply.github.com>
This commit is contained in:
Nathan Sobo 2022-03-29 16:28:19 -06:00
parent 39f46f64a6
commit 32b6c3d3d4
10 changed files with 288 additions and 246 deletions

View file

@ -1,5 +1,6 @@
import chroma from "chroma-js";
import core, { Color } from "./core";
import core from "./core";
import { Color } from "./lib";
import Theme, { BackgroundColor, Weight } from "./theme";
export function text(
@ -19,13 +20,31 @@ export function text(
};
}
export function border(theme: Theme, color: keyof Theme["borderColor"]) {
export interface BorderOptions {
width?: number;
top?: boolean;
bottom?: boolean;
left?: boolean;
right?: boolean;
overlay?: boolean;
}
export function border(
theme: Theme,
color: keyof Theme["borderColor"],
options?: BorderOptions
) {
return {
color: theme.borderColor[color].value,
width: 1,
...options,
};
}
export function iconColor(theme: Theme, color: keyof Theme["iconColor"]) {
return theme.iconColor[color].value;
}
export interface Player {
selection: {
cursor: Color;