Merge pull request #2006 from grahamhealy20/add-mono-font-to-textarea

Text areas use monospaced fonts with spellcheck disabled by default
This commit is contained in:
Andras Bacsai 2024-04-26 15:16:59 +02:00 committed by GitHub
commit a04674d93d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View File

@ -23,10 +23,11 @@ public function __construct(
public bool $disabled = false,
public bool $readonly = false,
public bool $allowTab = false,
public bool $spellcheck = false,
public ?string $helper = null,
public bool $realtimeValidation = false,
public bool $allowToPeak = true,
public string $defaultClass = "input scrollbar",
public string $defaultClass = "input scrollbar font-mono",
public string $defaultClassInput = "input"
) {
//

View File

@ -56,7 +56,7 @@ class="absolute inset-y-0 right-0 flex items-center h-6 pt-2 pr-2 cursor-pointer
</div>
@else
<textarea {{ $allowTab ? '@keydown.tab=handleKeydown' : '' }} placeholder="{{ $placeholder }}" {{ $attributes->merge(['class' => $defaultClass]) }}
<textarea {{ $allowTab ? '@keydown.tab=handleKeydown' : '' }} placeholder="{{ $placeholder }}" {{ !$spellcheck ? 'spellcheck=false' : '' }} {{ $attributes->merge(['class' => $defaultClass]) }}
@if ($realtimeValidation) wire:model.debounce.200ms="{{ $id }}"
@else
wire:model={{ $value ?? $id }}

View File

@ -2,7 +2,7 @@
<div>Your feedback helps us to improve Coolify. Thank you! 💜</div>
<form wire:submit="submit" class="flex flex-col gap-4 pt-4">
<x-forms.input id="subject" label="Subject" placeholder="Summary of your problem."></x-forms.input>
<x-forms.textarea rows="10" id="description" label="Description"
<x-forms.textarea rows="10" id="description" label="Description" class="font-sans" spellcheck
placeholder="Please provide as much information as possible."></x-forms.textarea>
<div></div>
<x-forms.button class="w-full mt-4" type="submit" @click="modalOpen=false">Send</x-forms.button>