fix issue with text component and adjust layer selections some more

This commit is contained in:
K Simmons 2022-10-19 13:45:00 -07:00
parent b7c439f4c4
commit 2aa2e5af7a
3 changed files with 8 additions and 7 deletions

View file

@ -123,7 +123,6 @@ export function text(
properties?: TextProperties properties?: TextProperties
) { ) {
let style = getStyle(layer, styleSetStyleOrProperties, styleOrProperties); let style = getStyle(layer, styleSetStyleOrProperties, styleOrProperties);
let size = fontSizes[properties?.size || "sm"];
if (typeof styleSetStyleOrProperties === "object") { if (typeof styleSetStyleOrProperties === "object") {
properties = styleSetStyleOrProperties; properties = styleSetStyleOrProperties;
@ -132,6 +131,8 @@ export function text(
properties = styleOrProperties; properties = styleOrProperties;
} }
let size = fontSizes[properties?.size || "sm"];
return { return {
family: fontFamilies[fontFamily], family: fontFamilies[fontFamily],
color: style.foreground, color: style.foreground,

View file

@ -2,7 +2,7 @@ import { ColorScheme } from "../themes/common/colorScheme";
import { background, border, borderColor, text } from "./components"; import { background, border, borderColor, text } from "./components";
export default function contextMenu(colorScheme: ColorScheme) { export default function contextMenu(colorScheme: ColorScheme) {
let layer = colorScheme.lowest; let layer = colorScheme.middle;
return { return {
background: background(layer), background: background(layer),
cornerRadius: 10, cornerRadius: 10,

View file

@ -139,16 +139,16 @@ export default function workspace(colorScheme: ColorScheme) {
}, },
toggleContactsButton: { toggleContactsButton: {
cornerRadius: 6, cornerRadius: 6,
color: foreground(layer), color: foreground(layer, "variant"),
iconWidth: 8, iconWidth: 8,
buttonWidth: 20, buttonWidth: 20,
active: { active: {
background: background(layer, "active"), background: background(layer, "variant", "active"),
color: foreground(layer, "active"), color: foreground(layer, "variant", "active"),
}, },
hover: { hover: {
background: background(layer, "hovered"), background: background(layer, "variant", "hovered"),
color: foreground(layer, "hovered"), color: foreground(layer, "variant", "hovered"),
}, },
}, },
toggleContactsBadge: { toggleContactsBadge: {