mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-21 18:06:30 +02:00
make textarea styles consistent with other inputs
This commit is contained in:
@@ -1,15 +1,20 @@
|
|||||||
.root {
|
.root {
|
||||||
transition: width 0.3s ease-in-out;
|
transition: width 0.3s ease-in-out;
|
||||||
|
|
||||||
&[data-disabled='true'] {
|
|
||||||
opacity: 0.6;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
color: var(--theme-colors-surface-foreground);
|
width: 100%;
|
||||||
background: var(--theme-colors-surface);
|
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
|
|
||||||
|
&[data-variant='default'] {
|
||||||
|
color: var(--theme-colors-surface-foreground);
|
||||||
|
background: var(--theme-colors-surface);
|
||||||
|
}
|
||||||
|
|
||||||
|
&[data-variant='filled'] {
|
||||||
|
color: var(--theme-colors-foreground);
|
||||||
|
background: var(--theme-colors-background);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.input:focus,
|
.input:focus,
|
||||||
@@ -20,3 +25,7 @@
|
|||||||
.label {
|
.label {
|
||||||
margin-bottom: var(--theme-spacing-sm);
|
margin-bottom: var(--theme-spacing-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.required {
|
||||||
|
color: var(--theme-colors-state-error);
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,7 +9,19 @@ export interface TextareaProps extends MantineTextareaProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
|
export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
|
||||||
({ children, classNames, maxWidth, style, width, ...props }: TextareaProps, ref) => {
|
(
|
||||||
|
{
|
||||||
|
children,
|
||||||
|
classNames,
|
||||||
|
maxWidth,
|
||||||
|
size = 'sm',
|
||||||
|
style,
|
||||||
|
variant = 'default',
|
||||||
|
width,
|
||||||
|
...props
|
||||||
|
}: TextareaProps,
|
||||||
|
ref,
|
||||||
|
) => {
|
||||||
return (
|
return (
|
||||||
<MantineTextarea
|
<MantineTextarea
|
||||||
classNames={{
|
classNames={{
|
||||||
@@ -21,7 +33,10 @@ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|||||||
...classNames,
|
...classNames,
|
||||||
}}
|
}}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
size={size}
|
||||||
|
spellCheck={false}
|
||||||
style={{ maxWidth, width, ...style }}
|
style={{ maxWidth, width, ...style }}
|
||||||
|
variant={variant}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
Reference in New Issue
Block a user