Refactor code

This commit is contained in:
2023-11-02 23:24:03 +07:00
parent cc147f071c
commit 6560c304c3
28 changed files with 163 additions and 157 deletions
@@ -0,0 +1,22 @@
// Styled
import { Error, Label, StyledFormRow } from './styled';
interface IFormRow {
label: string;
error?: string;
children: JSX.Element | JSX.Element[];
}
const FormRow = ({ label, error, children }: IFormRow) => {
return (
<StyledFormRow>
<Label>{label}</Label>
<div>
{children}
{error && <Error>{error}</Error>}
</div>
</StyledFormRow>
);
};
export default FormRow;