Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shahdivyank committed Oct 29, 2024
1 parent 35f7c1e commit 01cbfbb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/applications/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Textarea from "@/components/global/inputs/textarea";
import Select from "@/components/global/inputs/select";
import Text from "@/components/global/inputs/text";
import { Questions } from "@/types/questions";
import InputWithLabel from "@/components/global/inputs/input";
import Input from "@/components/global/inputs/input";

interface props {
title: string;
Expand All @@ -27,7 +27,7 @@ const Application = ({ title, questions }: props) => {
}}
/>

<InputWithLabel
<Input
meta={{
title: "Email",
placeholder: "Enter your email",
Expand Down
13 changes: 9 additions & 4 deletions src/components/global/inputs/input.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import { Input } from "@/components/ui/input";
import { Input as ShadCNInput } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { TextInput } from "@/types/questions";

const InputWithLabel = ({ meta }: { meta: TextInput }) => {
const Input = ({ meta }: { meta: TextInput }) => {
const { title, placeholder, value } = meta;

return (
<div className="grid w-full max-w-sm items-center gap-3">
<Label htmlFor={title}>{title}</Label>
<Input type="email" id={title} placeholder={placeholder} value={value} />
<ShadCNInput
type="email"
id={title}
placeholder={placeholder}
value={value}
/>
</div>
);
};

export default InputWithLabel;
export default Input;

0 comments on commit 01cbfbb

Please sign in to comment.