mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
41 lines
918 B
TypeScript
41 lines
918 B
TypeScript
// @ts-nocheck
|
|
import { InputGroupProps, SwitchProps } from '@blueprintjs/core';
|
|
import { FInputGroup, FSwitch, Group, Stack } from '@/components';
|
|
import { CLASSES } from '@/constants';
|
|
|
|
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>
|
|
);
|
|
}
|