summaryrefslogtreecommitdiff
path: root/src/components/Input.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-18 03:54:07 +0300
committereug-vs <eug-vs@keemail.me>2021-03-18 03:54:07 +0300
commit046c9af4b34cf572ae834cf6745990828fddcfa2 (patch)
treed5ffaefe781e530c70f98e0a05ffb2f8883096fc /src/components/Input.tsx
parent5ac1a56a157dc116fd61712ac47c29e6d02f4c0c (diff)
downloadcommercel-ui-046c9af4b34cf572ae834cf6745990828fddcfa2.tar.gz
feat: improve components style
Diffstat (limited to 'src/components/Input.tsx')
-rw-r--r--src/components/Input.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/Input.tsx b/src/components/Input.tsx
index 896a974..a8a6f31 100644
--- a/src/components/Input.tsx
+++ b/src/components/Input.tsx
@@ -5,14 +5,17 @@ export interface Props extends React.InputHTMLAttributes<HTMLInputElement> {
label?: string;
}
+const focusStyles = 'focus:outline-none focus:shadow focus:border-gray-400';
+const baseStyles = 'p-2 border bg-white border-gray-300 rounded-sm';
+
const InputBase: React.FC<Props> = ({ label, ...props }) => {
return (
<div className="m-2 mb-4 flex flex-col">
- <label htmlFor={props?.name} className="mb-1 text-gray-700">{label}</label>
+ <label htmlFor={props?.name} className="mb-1 text-sm text-gray-600">{label}</label>
<input
id={props?.name}
placeholder={label}
- className="p-2 border-2 border-black focus:outline-none"
+ className={`${baseStyles} ${focusStyles}`}
{...props}
/>
</div>