-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Client:Implemented the input component
This commit creates the Input component as discussed and made in figma. As props it takes normal input properties like placeholder,value etc. The styling has been done in input.css (I had to rename it input.css from input.module.css as it was not working when importing) Made changes to the index.html and tailwind config file to include "kavoon" font fixes:#77
- Loading branch information
Showing
4 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
import styles from './input.module.css'; | ||
import React from 'react'; | ||
import './input.css'; | ||
|
||
type InputComponentProps = { | ||
placeholder?: string; | ||
type Props = React.DetailedHTMLProps< | ||
React.InputHTMLAttributes<HTMLInputElement>, | ||
HTMLInputElement | ||
> & { | ||
width?: string; | ||
height?: string; | ||
}; | ||
|
||
function Input({ placeholder }: InputComponentProps) { | ||
const Input: React.FC<Props> = ({ | ||
width = '392px', | ||
height = '44px', | ||
...props | ||
}) => { | ||
return ( | ||
<div> | ||
<input style={styles} placeholder={placeholder}></input> | ||
</div> | ||
<input | ||
className={`w-[${width}] h-[${height}] bg-[#d9d9d9] border-4 border-black rounded-[20px] flex items-center justify-center text-center p-0 font-normal font-[Kavoon] text-[23.2px] leading-[29px] text-black placeholder-white placeholder-opacity-50"`} | ||
{...props} | ||
/> | ||
); | ||
} | ||
}; | ||
|
||
export default Input; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters