Skip to content

Commit

Permalink
Add email input hint to show when emails are verified
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jan 6, 2024
1 parent ad4bc8b commit 2ec4e8a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Livewire/PersonalInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Notifications\Notification;
use Illuminate\Support\HtmlString;

class PersonalInfo extends MyProfileComponent
{
Expand Down Expand Up @@ -61,6 +62,12 @@ protected function getEmailComponent(): Forms\Components\TextInput
->required()
->email()
->unique($this->userClass, ignorable: $this->user)
->hint(fn (): ?HtmlString => new HtmlString(
$this->user->email_verified_at
? '<small x-data="{ tooltip: \'Your email has been verified\' }" x-tooltip="tooltip">Verified</small>'
: null
))
->hintColor('success')
->label(__('filament-breezy::default.fields.email'));
}

Expand Down

0 comments on commit 2ec4e8a

Please sign in to comment.