This commit is contained in:
ari committed 2021-12-28 21:53:41 -05:00
1 parent 9d8cc9ed3e
commit 8058e314db
27 files changed
+87608 -11878

No files matched your search

+12 -11
View File
@@ -1,16 +1,17 @@
import { PropsWithChildren } from "react";
import { FC } from "react";
import { useInputWrapperStyles } from "./styles";
export interface Props {
label: string;
labelSize?: 'normal' | 'small';
noMargin?: boolean;
label: string;
labelSize?: 'normal' | 'small';
noMargin?: boolean;
}
export default function InputWrapper({label, children, labelSize='normal', noMargin=false}: PropsWithChildren<Props>) {
const {classes} = useInputWrapperStyles({labelSize, noMargin})
return <div className={classes.wrapper}>
<label className={classes.label}>{label}</label>
{children}
</div>
}
const InputWrapper: FC<Props> = ({ label, children, labelSize = 'normal', noMargin = false }) => {
const { classes } = useInputWrapperStyles({ labelSize, noMargin })
return <div className={classes.wrapper}>
<label className={classes.label}>{label}</label>
{children}
</div>
}
export default InputWrapper;