hensei-web/components/common/Input/index.module.scss
Justin Edmund 445da51688 Combine Input and CharLimitedFieldset
We fixed the input component and added a character counter to it, so we don't need a separate CharLimitedFieldSet anymore.

The input component has been simplified to *just* be an input component, so it no longer displays an error. We will make a new component for error handling and labeling. It will probably be an improvement on our custom Fieldset somehow.
2023-06-24 15:30:02 -07:00

78 lines
1.3 KiB
SCSS

.input {
-webkit-font-smoothing: antialiased;
background-color: var(--input-bg);
border: 2px solid transparent;
border-radius: $input-corner;
box-sizing: border-box;
display: block;
width: 100%;
&:not(.wrapper) {
padding: $unit * 1.5 $unit-2x;
}
&.wrapper {
$offset: 2px;
align-items: center;
background: var(--input-bg);
border-radius: $input-corner;
border: $offset solid transparent;
box-sizing: border-box;
position: relative;
.counter {
color: var(--text-tertiary);
display: block;
font-weight: $bold;
line-height: 42px;
position: absolute;
right: $unit-2x;
top: 0;
}
input {
background: transparent;
border-radius: $input-corner;
border: none;
box-sizing: border-box;
padding: $unit * 1.5 $unit-2x;
width: 100%;
}
}
&[type='number']::-webkit-inner-spin-button {
-webkit-appearance: none;
}
&:focus {
border: 2px solid $blue;
outline: none;
}
&.bound {
background-color: var(--input-bound-bg);
&:hover {
background-color: var(--input-bound-bg-hover);
}
}
&.AlignRight {
text-align: right;
}
&.Hidden {
display: none;
}
}
.counter {
display: none;
}
.input::placeholder,
.input > input::placeholder {
color: var(--text-secondary);
opacity: 1;
}