Use a textarea in the feedback modal
This commit is contained in:
parent
721cccf152
commit
25385edf12
3 changed files with 35 additions and 15 deletions
|
|
@ -38,6 +38,15 @@ export const InputField = forwardRef(
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{prefix && <span>{prefix}</span>}
|
{prefix && <span>{prefix}</span>}
|
||||||
|
{type === "textarea" ? (
|
||||||
|
<textarea
|
||||||
|
id={id}
|
||||||
|
{...rest}
|
||||||
|
ref={ref}
|
||||||
|
type={type}
|
||||||
|
disabled={disabled}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
<input
|
<input
|
||||||
id={id}
|
id={id}
|
||||||
{...rest}
|
{...rest}
|
||||||
|
|
@ -46,6 +55,8 @@ export const InputField = forwardRef(
|
||||||
checked={checked}
|
checked={checked}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<label htmlFor={id}>
|
<label htmlFor={id}>
|
||||||
{type === "checkbox" && (
|
{type === "checkbox" && (
|
||||||
<div className={styles.checkbox}>
|
<div className={styles.checkbox}>
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@
|
||||||
border: 1px solid var(--inputBorderColor);
|
border: 1px solid var(--inputBorderColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputField input {
|
.inputField input,
|
||||||
|
.inputField textarea {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
@ -42,6 +43,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputField.disabled input,
|
.inputField.disabled input,
|
||||||
|
.inputField.disabled textarea,
|
||||||
.inputField.disabled span {
|
.inputField.disabled span {
|
||||||
color: var(--textColor2);
|
color: var(--textColor2);
|
||||||
}
|
}
|
||||||
|
|
@ -54,12 +56,14 @@
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputField input::placeholder {
|
.inputField input::placeholder,
|
||||||
|
.inputField textarea::placeholder {
|
||||||
transition: color 0.25s ease-in 0s;
|
transition: color 0.25s ease-in 0s;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputField input:placeholder-shown:focus::placeholder {
|
.inputField input:placeholder-shown:focus::placeholder,
|
||||||
|
.inputField textarea:placeholder-shown:focus::placeholder {
|
||||||
transition: color 0.25s ease-in 0.1s;
|
transition: color 0.25s ease-in 0.1s;
|
||||||
color: var(--textColor2);
|
color: var(--textColor2);
|
||||||
}
|
}
|
||||||
|
|
@ -86,13 +90,17 @@
|
||||||
border-color: var(--inputBorderColorFocused);
|
border-color: var(--inputBorderColorFocused);
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputField input:focus {
|
.inputField input:focus,
|
||||||
|
.inputField textarea:focus {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputField input:focus + label,
|
.inputField input:focus + label,
|
||||||
.inputField input:not(:placeholder-shown) + label,
|
.inputField input:not(:placeholder-shown) + label,
|
||||||
.inputField.prefix input + label {
|
.inputField.prefix textarea + label,
|
||||||
|
.inputField textarea:focus + label,
|
||||||
|
.inputField textarea:not(:placeholder-shown) + label,
|
||||||
|
.inputField.prefix textarea + label {
|
||||||
background-color: var(--bgColor2);
|
background-color: var(--bgColor2);
|
||||||
transition: font-size 0.25s ease-out 0s, color 0.25s ease-out 0s,
|
transition: font-size 0.25s ease-out 0s, color 0.25s ease-out 0s,
|
||||||
top 0.25s ease-out 0s, background-color 0.25s ease-out 0s;
|
top 0.25s ease-out 0s, background-color 0.25s ease-out 0s;
|
||||||
|
|
@ -102,7 +110,8 @@
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputField input:focus + label {
|
.inputField input:focus + label,
|
||||||
|
.inputField textarea:focus + label {
|
||||||
color: var(--inputBorderColorFocused);
|
color: var(--inputBorderColorFocused);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ export function FeedbackModal({ inCall, roomId, ...rest }) {
|
||||||
id="description"
|
id="description"
|
||||||
name="description"
|
name="description"
|
||||||
label="Description (optional)"
|
label="Description (optional)"
|
||||||
type="text"
|
type="textarea"
|
||||||
/>
|
/>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
<FieldRow>
|
<FieldRow>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue