heheer 7a929db0a5
chore(ui): login page & workflow page (#3046)
* login page & number input & multirow select & llm select

* workflow

* adjust nodes
2024-11-07 10:04:58 +08:00

32 lines
579 B
TypeScript

import React from 'react';
import { Box, BoxProps } from '@chakra-ui/react';
const FormLabel = ({
children,
required,
...props
}: BoxProps & {
required?: boolean;
children: React.ReactNode;
}) => {
return (
<Box
color={'myGray.900'}
fontWeight={'medium'}
fontSize={'sm'}
position={'relative'}
flexShrink={0}
{...props}
>
{required && (
<Box color={'red.600'} position={'absolute'} top={'-4px'} left={'-6px'}>
*
</Box>
)}
{children}
</Box>
);
};
export default FormLabel;