mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-17 21:43:06 +00:00
🧱 refactor: Use the Framed Textarea Variant in the Skill Editors (#16894)
This commit is contained in:
parent
578572327a
commit
c3d94a2cdb
4 changed files with 11 additions and 7 deletions
|
|
@ -205,6 +205,7 @@ export default function CreateSkillDialog({
|
|||
{localize('com_ui_description')}
|
||||
</label>
|
||||
<TextareaAutosize
|
||||
variant="framed"
|
||||
focusOutline="hidden"
|
||||
id="create-skill-description"
|
||||
minRows={2}
|
||||
|
|
@ -213,7 +214,7 @@ export default function CreateSkillDialog({
|
|||
aria-label={localize('com_ui_description')}
|
||||
aria-invalid={errors.description ? 'true' : 'false'}
|
||||
aria-describedby={errors.description ? 'create-skill-description-error' : undefined}
|
||||
className="border-border-medium text-text-primary placeholder:text-text-secondary focus-visible:ring-ring-primary w-full resize-none rounded-xl border bg-transparent px-3 py-2 text-sm focus-visible:ring-2"
|
||||
className="w-full resize-none px-3 py-2 text-sm"
|
||||
{...register('description', {
|
||||
required: localize('com_ui_skill_description_required'),
|
||||
maxLength: {
|
||||
|
|
@ -241,13 +242,14 @@ export default function CreateSkillDialog({
|
|||
{localize('com_ui_skill_instructions')}
|
||||
</label>
|
||||
<TextareaAutosize
|
||||
variant="framed"
|
||||
focusOutline="hidden"
|
||||
id="create-skill-body"
|
||||
minRows={6}
|
||||
maxRows={12}
|
||||
placeholder={localize('com_ui_skill_instructions_placeholder')}
|
||||
aria-label={localize('com_ui_skill_instructions')}
|
||||
className="border-border-medium text-text-primary placeholder:text-text-secondary focus-visible:ring-ring-primary w-full resize-none rounded-xl border bg-transparent px-3 py-2 text-sm focus-visible:ring-2"
|
||||
className="w-full resize-none px-3 py-2 text-sm"
|
||||
{...register('body')}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -226,6 +226,7 @@ export default function CreateSkillForm({
|
|||
<span className="text-text-destructive ml-0.5">*</span>
|
||||
</Label>
|
||||
<TextareaAutosize
|
||||
variant="framed"
|
||||
focusOutline="hidden"
|
||||
{...field}
|
||||
id="skill-description"
|
||||
|
|
@ -235,7 +236,7 @@ export default function CreateSkillForm({
|
|||
aria-label={localize('com_ui_description')}
|
||||
aria-invalid={errors.description ? 'true' : 'false'}
|
||||
aria-describedby={errors.description ? 'skill-description-error' : undefined}
|
||||
className="border-border-medium text-text-primary placeholder:text-text-secondary focus-visible:ring-ring-primary w-full resize-none rounded-xl border bg-transparent p-3 text-sm focus-visible:ring-2"
|
||||
className="w-full resize-none p-3 text-sm"
|
||||
/>
|
||||
<p className="text-text-secondary mt-1 text-xs">
|
||||
{localize('com_ui_skill_description_field_hint')}
|
||||
|
|
|
|||
|
|
@ -294,6 +294,7 @@ export default function SkillForm({ skillId }: SkillFormProps) {
|
|||
<span className="text-text-destructive ml-0.5">*</span>
|
||||
</Label>
|
||||
<TextareaAutosize
|
||||
variant="framed"
|
||||
focusOutline="hidden"
|
||||
{...field}
|
||||
id="skill-description"
|
||||
|
|
@ -303,7 +304,7 @@ export default function SkillForm({ skillId }: SkillFormProps) {
|
|||
aria-label={localize('com_ui_description')}
|
||||
aria-invalid={errors.description ? 'true' : 'false'}
|
||||
aria-describedby={errors.description ? 'skill-description-error' : undefined}
|
||||
className="border-border-medium text-text-primary placeholder:text-text-secondary focus-visible:ring-ring-primary w-full resize-none rounded-xl border bg-transparent p-3 text-sm focus-visible:ring-2"
|
||||
className="w-full resize-none p-3 text-sm"
|
||||
/>
|
||||
<p className="text-text-secondary mt-1 text-xs">
|
||||
{localize('com_ui_skill_description_field_hint')}
|
||||
|
|
|
|||
|
|
@ -1222,7 +1222,7 @@
|
|||
},
|
||||
"client/src/components/Skills/dialogs/CreateSkillDialog.tsx": {
|
||||
"shadcn/no-restyle": {
|
||||
"count": 26
|
||||
"count": 10
|
||||
}
|
||||
},
|
||||
"client/src/components/Skills/display/SkillDetail.tsx": {
|
||||
|
|
@ -1237,7 +1237,7 @@
|
|||
},
|
||||
"client/src/components/Skills/forms/CreateSkillForm.tsx": {
|
||||
"shadcn/no-restyle": {
|
||||
"count": 14
|
||||
"count": 6
|
||||
}
|
||||
},
|
||||
"client/src/components/Skills/forms/SkillContentEditor.tsx": {
|
||||
|
|
@ -1247,7 +1247,7 @@
|
|||
},
|
||||
"client/src/components/Skills/forms/SkillForm.tsx": {
|
||||
"shadcn/no-restyle": {
|
||||
"count": 14
|
||||
"count": 6
|
||||
}
|
||||
},
|
||||
"client/src/components/Skills/lists/SkillListItem.tsx": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue