device switch

This commit is contained in:
2026-02-20 21:58:49 -05:00
parent 0c16353e2e
commit 1a5efceebd
10 changed files with 78 additions and 8 deletions

View File

@@ -8,7 +8,8 @@ export const SelectableBox: ParentComponent<
selected: () => boolean;
} & BoxOptions
> = (props) => {
const { theme } = useTheme();
const themeContext = useTheme();
const { theme } = themeContext;
const child = solidChildren(() => props.children);
@@ -16,7 +17,13 @@ export const SelectableBox: ParentComponent<
<box
border={!!props.border}
borderColor={props.selected() ? theme.surface : theme.border}
backgroundColor={props.selected() ? theme.primary : theme.surface}
backgroundColor={
props.selected()
? theme.primary
: themeContext.selected === "system"
? "transparent"
: themeContext.theme.surface
}
{...props}
>
{child()}