first stylings

This commit is contained in:
Maximus 2022-08-08 12:10:13 +03:00
parent d6d805e3dd
commit 00c29d39d0
2 changed files with 20 additions and 5 deletions

View File

@ -1,21 +1,37 @@
import classNames from "classnames"; import classNames from "classnames";
import { omit } from "lodash"; import { omit } from "lodash";
import React from "react"; import React from "react";
import "../index.css";
type Props = { type Props = {
placeholder?: string | undefined, placeholder?: string | undefined,
color?: string |undefined,
className?: string | undefined, className?: string | undefined,
} & Omit<React.InputHTMLAttributes<HTMLInputElement> ,"">; } & Omit<React.InputHTMLAttributes<HTMLInputElement> ,"">;
export const TextInput = ({ export const TextInput = ({
placeholder = undefined, placeholder = undefined,
color = "white",
className, className,
...props ...props
} :Props) => { } :Props) => {
return( return(
<input type="text" placeholder={placeholder} color={color} className={classNames({className})} /> <input
type="text"
placeholder={placeholder}
className={classNames(
'w-100',
'border',
'border-2',
'border-solid',
'border-gray-200',
'text-gray-900',
'rounded',
'outline-none',
'hover:border-gray-300',
'focus:border-gray-500',
{
className
})}
/>
); );
} }

View File

@ -12,6 +12,5 @@ const Template: ComponentStory<typeof TextInput> = (args) => <TextInput {...args
export const TextInputStory = Template.bind({}); export const TextInputStory = Template.bind({});
TextInputStory.args ={ TextInputStory.args ={
placeholder: "uaaaaaa", placeholder: "Search",
color: 'blue'
} }