mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-15 07:17:00 +10:00
- implement colors section
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user