mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
Migrate to Mantine v8 and Design Changes (#961)
* mantine v8 migration * various design changes and improvements
This commit is contained in:
parent
bea55d48a8
commit
c1330d92b2
473 changed files with 12469 additions and 11607 deletions
31
src/shared/components/textarea/textarea.tsx
Normal file
31
src/shared/components/textarea/textarea.tsx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { Textarea as MantineTextarea, TextareaProps as MantineTextareaProps } from '@mantine/core';
|
||||
import { CSSProperties, forwardRef } from 'react';
|
||||
|
||||
import styles from './textarea.module.css';
|
||||
|
||||
export interface TextareaProps extends MantineTextareaProps {
|
||||
maxWidth?: CSSProperties['maxWidth'];
|
||||
width?: CSSProperties['width'];
|
||||
}
|
||||
|
||||
export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
|
||||
({ children, classNames, maxWidth, style, width, ...props }: TextareaProps, ref) => {
|
||||
return (
|
||||
<MantineTextarea
|
||||
classNames={{
|
||||
input: styles.input,
|
||||
label: styles.label,
|
||||
required: styles.required,
|
||||
root: styles.root,
|
||||
wrapper: styles.wrapper,
|
||||
...classNames,
|
||||
}}
|
||||
ref={ref}
|
||||
style={{ maxWidth, width, ...style }}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</MantineTextarea>
|
||||
);
|
||||
},
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue