fix(onboarding): use preset board colors
This commit is contained in:
1 parent
2067d851cf
commit
f4891447d3
1 file changed
+21
-2
@@ -34,6 +34,7 @@ import {
|
|||||||
Title,
|
Title,
|
||||||
UnstyledButton,
|
UnstyledButton,
|
||||||
useMantineColorScheme,
|
useMantineColorScheme,
|
||||||
|
useMantineTheme,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import type { MantineSize } from "@mantine/core";
|
import type { MantineSize } from "@mantine/core";
|
||||||
import {
|
import {
|
||||||
@@ -1249,6 +1250,8 @@ const formatSecretKind = (kind: IntegrationSecretKind) =>
|
|||||||
const BoardBuilder = (props: StudioSectionProps) => {
|
const BoardBuilder = (props: StudioSectionProps) => {
|
||||||
const t = useScopedI18n("init.studio.board");
|
const t = useScopedI18n("init.studio.board");
|
||||||
const reduceMotion = useReducedMotion();
|
const reduceMotion = useReducedMotion();
|
||||||
|
const theme = useMantineTheme();
|
||||||
|
const colorSwatches = Object.values(theme.colors).map((color) => color[6]);
|
||||||
const previewWidgetKinds = getPreviewWidgetKinds(props);
|
const previewWidgetKinds = getPreviewWidgetKinds(props);
|
||||||
const previewAppCount = getPreviewAppCount(props);
|
const previewAppCount = getPreviewAppCount(props);
|
||||||
return (
|
return (
|
||||||
@@ -1282,8 +1285,24 @@ const BoardBuilder = (props: StudioSectionProps) => {
|
|||||||
withAsterisk
|
withAsterisk
|
||||||
/>
|
/>
|
||||||
<SimpleGrid cols={2}>
|
<SimpleGrid cols={2}>
|
||||||
<ColorInput label={t("primaryColor")} value={props.primaryColor} onChange={props.setPrimaryColor} />
|
<ColorInput
|
||||||
<ColorInput label={t("secondaryColor")} value={props.secondaryColor} onChange={props.setSecondaryColor} />
|
label={t("primaryColor")}
|
||||||
|
value={props.primaryColor}
|
||||||
|
onChange={props.setPrimaryColor}
|
||||||
|
format="hex"
|
||||||
|
swatches={colorSwatches}
|
||||||
|
withPicker={false}
|
||||||
|
disallowInput
|
||||||
|
/>
|
||||||
|
<ColorInput
|
||||||
|
label={t("secondaryColor")}
|
||||||
|
value={props.secondaryColor}
|
||||||
|
onChange={props.setSecondaryColor}
|
||||||
|
format="hex"
|
||||||
|
swatches={colorSwatches}
|
||||||
|
withPicker={false}
|
||||||
|
disallowInput
|
||||||
|
/>
|
||||||
</SimpleGrid>
|
</SimpleGrid>
|
||||||
<Stack gap="xs">
|
<Stack gap="xs">
|
||||||
<Text size="sm" fw={500}>
|
<Text size="sm" fw={500}>
|
||||||
|
|||||||
Reference in new issue
Block a user