mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
🆙 Init V3
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { FC, useMemo } from 'react';
|
||||
import { Flex, FlexProps } from './Flex';
|
||||
|
||||
export interface FormGroupProps extends FlexProps
|
||||
{
|
||||
}
|
||||
|
||||
export const FormGroup: FC<FormGroupProps> = props =>
|
||||
{
|
||||
const { classNames = [], ...rest } = props;
|
||||
|
||||
const getClassNames = useMemo(() =>
|
||||
{
|
||||
const newClassNames: string[] = [ 'form-group' ];
|
||||
|
||||
if(classNames.length) newClassNames.push(...classNames);
|
||||
|
||||
return newClassNames;
|
||||
}, [ classNames ]);
|
||||
|
||||
return <Flex classNames={ getClassNames } { ...rest } />;
|
||||
};
|
||||
Reference in New Issue
Block a user