diff --git a/packages/console/package.json b/packages/console/package.json index 7e92f4fa3..eb95cb0b0 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -19,6 +19,7 @@ }, "devDependencies": { "@fontsource/roboto-mono": "^4.5.7", + "@logto/connector-kit": "workspace:*", "@logto/core-kit": "workspace:*", "@logto/language-kit": "workspace:*", "@logto/phrases": "workspace:*", diff --git a/packages/console/src/components/Textarea/index.module.scss b/packages/console/src/components/Textarea/index.module.scss index 936bb7f3b..6611c4cf4 100644 --- a/packages/console/src/components/Textarea/index.module.scss +++ b/packages/console/src/components/Textarea/index.module.scss @@ -11,6 +11,14 @@ outline-color: var(--color-focused-variant); } + &.error { + border-color: var(--color-error); + + &:focus-within { + outline-color: var(--color-danger-focused); + } + } + textarea { width: 100%; height: 100%; @@ -23,7 +31,7 @@ padding: 0; &::placeholder { - color: var(--color-caption); + color: var(--color-placeholder); } } } diff --git a/packages/console/src/components/Textarea/index.tsx b/packages/console/src/components/Textarea/index.tsx index d18f8037c..6936a600f 100644 --- a/packages/console/src/components/Textarea/index.tsx +++ b/packages/console/src/components/Textarea/index.tsx @@ -6,11 +6,15 @@ import * as styles from './index.module.scss'; type Props = HTMLProps & { className?: string; + hasError?: boolean; }; -const Textarea = ({ className, ...rest }: Props, reference: ForwardedRef) => { +const Textarea = ( + { className, hasError, ...rest }: Props, + reference: ForwardedRef +) => { return ( -
+