Skip to content
Snippets Groups Projects
Commit c1f4f6c1 authored by julientaq's avatar julientaq
Browse files

Updated textfield and remove author prop.

parent f337e351
No related branches found
No related tags found
No related merge requests found
...@@ -10,15 +10,16 @@ const TextField = ({ ...@@ -10,15 +10,16 @@ const TextField = ({
value = '', value = '',
onBlur, onBlur,
onChange, onChange,
readonly,
}) => ( }) => (
<label className={classes.root}> <label className={classes.root}>
{label && <span className={classes.text}>{label}</span>} {label && <span className={classes.text}>{label}</span>}
<input <input
className={classes.input}
name={name} name={name}
onBlur={onBlur} onBlur={onBlur}
onChange={onChange} onChange={onChange}
placeholder={placeholder} placeholder={placeholder}
readOnly={readonly}
required={required} required={required}
type={type} type={type}
value={value} value={value}
......
...@@ -11,36 +11,40 @@ ...@@ -11,36 +11,40 @@
margin-right: 10px; margin-right: 10px;
} }
input { .root input {
--color-back: var(--color-primary); --color-back: darkgray;
background: linear-gradient(
to right,
transparent 0%,
transparent 2px,
white 2px,
white 4px
),
linear-gradient(white 0%, white 90%, var(--color-back) 95%, white 100%);
background-position: 0 0, 0.2em 0;
background-repeat: repeat-X, repeat-Y;
background-size: 7px 100%, 100% 1.3em;
border: none; border: none;
border-left: 1px solid darkgrey; border-left: 1px solid darkgrey;
caret-color: var(--color-primary); caret-color: var(--color-primary);
flex: 1; flex: 1;
font-family: var(--font-local); font-family: var(--font-local), serif;
font-size: inherit; font-size: inherit;
max-width: 100%; max-width: 100%;
padding: 0 0.5em; padding: 0 0.5em;
&:hover, &:hover,
&:focus { &:focus {
background: linear-gradient(
to right,
transparent 0%,
transparent 2px,
white 2px,
white 4px
),
linear-gradient(white 0%, white 90%, var(--color-back) 95%, white 100%);
background-position: 0 0, 0.2em 0;
background-repeat: repeat-X, repeat-Y;
background-size: 7px 100%, 100% 1.8em;
border-color: transparent; border-color: transparent;
box-shadow: none; box-shadow: none;
outline-style: none; outline-style: none;
} }
&:hover {
--color-back: var(--color-primary);
}
&:focus { &:focus {
--color-back: #aaa; --color-back: #aaa;
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment