Maharshi Alpesh 0250ced3d7
fix: fixing the layout color (#4879)
fix: adding tooltip to show items which are only for the visual purpose

fix: persist the theme across reloads

chore: modifying the mobile styles
2025-02-20 11:31:01 -03:00

32 lines
982 B
TypeScript

import {useThemeBuilder} from "../../provider";
import {ConfigSection} from "../config-section";
import EditableButton from "./editable-button";
import {Crop} from "@/components/icons/crop";
const BORDER_WIDTHS = [
{title: "thin", className: "rounded-tl-md border-t-1 border-l-1"},
{title: "medium", className: "rounded-tl-md border-t-2 border-l-2"},
{title: "thick", className: "rounded-tl-md border-t-4 border-l-4"},
] as const;
export function BorderWidths() {
const {borderWidthValue, setBorderWidthValue} = useThemeBuilder();
return (
<ConfigSection visualPurposeOnly icon={<Crop className="w-4 h-4" />} title="Border width">
{BORDER_WIDTHS.map(({title, className}) => (
<EditableButton
key={title}
aria-label={`Set border width to ${title}`}
className={className}
setValue={setBorderWidthValue}
title={title}
value={borderWidthValue}
/>
))}
</ConfigSection>
);
}