diff --git a/packages/ui/src/fields/Textarea/index.css b/packages/ui/src/fields/Textarea/index.css index fb9ca5a20f5..c781b8e6bca 100644 --- a/packages/ui/src/fields/Textarea/index.css +++ b/packages/ui/src/fields/Textarea/index.css @@ -5,6 +5,12 @@ flex-direction: column; gap: var(--spacer-2); + .field-type__wrap { + display: flex; + flex-direction: column; + gap: var(--spacer-2); + } + textarea { overflow-y: auto; resize: vertical; @@ -12,6 +18,14 @@ height: auto; display: flex; field-sizing: content; + + &:hover:not(:focus):not(:disabled) { + border-color: var(--border-default-default); + } + + &:focus { + border-color: var(--border-selected); + } } textarea:not(:empty) { @@ -19,9 +33,10 @@ } &.read-only { - .textarea-outer { - background: var(--bg-disabled-default); - color: var(--text-disabled-default); + textarea { + background: var(--bg-default-default); + border-color: var(--border-default-default); + color: var(--text-default); } } diff --git a/test/v4/collections/Textarea/index.ts b/test/v4/collections/Textarea/index.ts index f3fe34baa4b..f9f2c0dd0df 100644 --- a/test/v4/collections/Textarea/index.ts +++ b/test/v4/collections/Textarea/index.ts @@ -16,19 +16,32 @@ const TextareaFields: CollectionConfig = { { name: 'contentRequired', type: 'textarea', - label: 'Content', + label: 'Content Required', required: true, admin: { - description: 'The main body content for this entry', + description: 'This field is required', }, }, { - name: 'contentDisabled', + name: 'contentReadOnly', type: 'textarea', - label: 'Content', + label: 'Content Read Only', + defaultValue: + 'Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers.', admin: { readOnly: true, - description: 'The main body content for this entry', + description: 'This field is read-only', + }, + }, + { + name: 'contentDisabled', + type: 'textarea', + label: 'Content Disabled', + defaultValue: + 'Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers.', + admin: { + disabled: true, + description: 'This field is disabled', }, }, ],