feat: paper template customize

This commit is contained in:
Ahmed Bouhuolia
2024-09-10 21:54:37 +02:00
parent 77a1e35ff4
commit 716dec799a
19 changed files with 269 additions and 293 deletions

View File

@@ -0,0 +1,40 @@
// @ts-nocheck
import { FInputGroup, FSwitch, Group, Stack } from '@/components';
import { CLASSES } from '@/constants';
import { InputGroupProps, SwitchProps } from '@blueprintjs/core';
export function ElementCustomizeFieldsGroup({
label,
children,
}: {
label: string;
children: React.ReactNode;
}) {
return (
<Stack spacing={20}>
<h4 className={CLASSES.TEXT_MUTED} style={{ fontWeight: 600 }}>
{label}
</h4>
<Stack spacing={14}>{children}</Stack>
</Stack>
);
}
export function ElementCustomizeContentItemFieldGroup({
inputGroupProps,
switchProps,
}: {
inputGroupProps: InputGroupProps;
switchProps?: SwitchProps;
}) {
return (
<Group spacing={14} position={'apart'}>
<FSwitch {...inputGroupProps} fastField />
{switchProps?.name && (
<FInputGroup {...switchProps} style={{ maxWidth: 150 }} fastField />
)}
</Group>
);
}