search sscreen
This commit is contained in:
18
src/components/field/field.tsx
Normal file
18
src/components/field/field.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import React from "react";
|
||||
|
||||
import { FieldInput, FieldLabel, FieldWrapper } from "./field.style";
|
||||
|
||||
export const InputField = ({ id, placeHolder, value, label }) => {
|
||||
return (
|
||||
<FieldWrapper>
|
||||
<FieldLabel htmlFor={id}>
|
||||
{label}
|
||||
</FieldLabel>
|
||||
<FieldInput id={id} type="text" placeholder={placeHolder} value={value} />
|
||||
</FieldWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
InputField.defaultProps = {
|
||||
id: `input-${(Math.random() * 10).toString()}`,
|
||||
};
|
||||
Reference in New Issue
Block a user