mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-13 20:10:07 +02:00
33 lines
623 B
TypeScript
33 lines
623 B
TypeScript
import { ReactNode } from 'react';
|
|
import { Flex, Group } from '@mantine/core';
|
|
|
|
export const Option = ({ children }: any) => {
|
|
return (
|
|
<Group
|
|
grow
|
|
p="0.5rem"
|
|
>
|
|
{children}
|
|
</Group>
|
|
);
|
|
};
|
|
|
|
interface LabelProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
const Label = ({ children }: LabelProps) => {
|
|
return <Flex align="flex-start">{children}</Flex>;
|
|
};
|
|
|
|
interface ControlProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
const Control = ({ children }: ControlProps) => {
|
|
return <Flex justify="flex-end">{children}</Flex>;
|
|
};
|
|
|
|
Option.Label = Label;
|
|
Option.Control = Control;
|