- implement colors section

This commit is contained in:
Amruth Pillai
2020-07-09 20:06:49 +05:30
parent 3b252476c4
commit 3eaab3b427
7 changed files with 86 additions and 1 deletions
+16
View File
@@ -127,6 +127,22 @@ const Input = ({
</div>
)}
{type === 'color' && (
<div className="relative grid items-center">
<div className={styles.circle} style={{ backgroundColor: value }} />
<input
id={uuid}
name={name}
type="text"
value={value}
onBlur={onBlur}
onChange={onChange}
placeholder={placeholder}
/>
</div>
)}
{error && touched && <p>{error}</p>}
</label>
</div>
+9
View File
@@ -29,3 +29,12 @@
.container label > p {
@apply mt-1 text-red-600 text-xs;
}
.circle {
left: 14px;
@apply absolute bg-white rounded-full w-6 h-6;
}
div.circle + input {
padding-left: 44px;
}