feat: add configurable headers and instance branding (#6690)
This commit is contained in:
1 parent
97d8390b20
commit
9303dbd284
102 files changed
+12153
-609
No files matched your search
@@ -0,0 +1,66 @@
|
||||
"use client";
|
||||
|
||||
import { Box, SimpleGrid, Stack, Text } from "@mantine/core";
|
||||
|
||||
import { SelectableCard } from "./selectable-card";
|
||||
|
||||
export const cornerStyleValues = ["xs", "sm", "md", "lg", "xl"] as const;
|
||||
|
||||
export type CornerStyle = (typeof cornerStyleValues)[number];
|
||||
|
||||
interface CornerStylePickerProps {
|
||||
label: string;
|
||||
description?: string;
|
||||
value: CornerStyle;
|
||||
labels: Record<CornerStyle, string>;
|
||||
onChange: (value: CornerStyle) => void;
|
||||
compact?: boolean;
|
||||
}
|
||||
|
||||
export const CornerStylePicker = ({
|
||||
label,
|
||||
description,
|
||||
value,
|
||||
labels,
|
||||
onChange,
|
||||
compact = false,
|
||||
}: CornerStylePickerProps) => {
|
||||
const previewHeight = compact ? 24 : 34;
|
||||
|
||||
return (
|
||||
<Box component="fieldset" m={0} p={0} style={{ border: 0, minWidth: 0 }}>
|
||||
<Text component="legend" fw={500} size="sm" p={0}>
|
||||
{label}
|
||||
</Text>
|
||||
<Stack gap="xs" mt={2}>
|
||||
{description ? (
|
||||
<Text size="sm" c="dimmed">
|
||||
{description}
|
||||
</Text>
|
||||
) : null}
|
||||
<SimpleGrid cols={{ base: 3, xs: 5 }} spacing="xs">
|
||||
{cornerStyleValues.map((cornerStyle) => (
|
||||
<SelectableCard
|
||||
key={cornerStyle}
|
||||
selected={value === cornerStyle}
|
||||
onClick={() => onChange(cornerStyle)}
|
||||
radius={cornerStyle}
|
||||
p="xs"
|
||||
aria-label={labels[cornerStyle]}
|
||||
style={compact ? { minHeight: "auto", height: "auto" } : undefined}
|
||||
>
|
||||
<Box
|
||||
h={previewHeight}
|
||||
bg="var(--mantine-color-default-hover)"
|
||||
style={{ borderRadius: `var(--mantine-radius-${cornerStyle})` }}
|
||||
/>
|
||||
<Text size="xs" ta="center" mt="xs">
|
||||
{labels[cornerStyle]}
|
||||
</Text>
|
||||
</SelectableCard>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
</Stack>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
@@ -27,6 +27,8 @@ export { LanguageIcon } from "./language-icon";
|
||||
export { LanguageCombobox } from "./language-combobox";
|
||||
export { ColorSchemeCombobox } from "./color-scheme-combobox";
|
||||
export { BoardColorInput } from "./board-color-input";
|
||||
export { CornerStylePicker, cornerStyleValues } from "./corner-style-picker";
|
||||
export type { CornerStyle } from "./corner-style-picker";
|
||||
export { IntegrationMarquee } from "./integration-marquee";
|
||||
export { Link } from "./link";
|
||||
export {
|
||||
|
||||
Reference in new issue
Block a user