diff --git a/packages/console/src/components/Textarea/index.module.scss b/packages/console/src/components/Textarea/index.module.scss new file mode 100644 index 000000000..330348fda --- /dev/null +++ b/packages/console/src/components/Textarea/index.module.scss @@ -0,0 +1,29 @@ +@use '@/scss/underscore' as _; + +.container { + border-radius: 6px; + border: 1px solid var(--color-border); + outline: 3px solid transparent; + padding: _.unit(2) _.unit(3); + + &:focus-within { + border-color: var(--color-primary); + outline-color: var(--color-focused-variant); + } + + textarea { + width: 100%; + height: 100%; + color: var(--color-text); + font: var(--font-body-medium); + background: transparent; + border: none; + outline: none; + resize: none; + padding: 0; + + &::placeholder { + color: var(--color-caption); + } + } +} diff --git a/packages/console/src/components/Textarea/index.tsx b/packages/console/src/components/Textarea/index.tsx new file mode 100644 index 000000000..0a6f40738 --- /dev/null +++ b/packages/console/src/components/Textarea/index.tsx @@ -0,0 +1,18 @@ +import classNames from 'classnames'; +import { ForwardedRef, forwardRef, HTMLProps } from 'react'; + +import * as styles from './index.module.scss'; + +type Props = HTMLProps & { + className?: string; +}; + +const Textarea = ({ className, ...rest }: Props, reference: ForwardedRef) => { + return ( +
+