Textinput suffix icon color

Hello all, I'm wondering if there is any way to add a color to the suffix icon on my input. Use case: An action validates a country code, if the country code is true it affixes the valid icon:
->action(function (Forms\Components\TextInput $component, $state) {
$iban = new ValidateIban($state);
if ($iban->checkIfValid()) {
$component->suffixIcon('heroicon-m-check');
}
})
->action(function (Forms\Components\TextInput $component, $state) {
$iban = new ValidateIban($state);
if ($iban->checkIfValid()) {
$component->suffixIcon('heroicon-m-check');
}
})
` I'm wondering if there is a way to add a color to the suffixIcon. Thank you!
1 Reply
Patrick Boivin
Patrick Boivin11mo ago
I think the easiest way is with custom CSS. You could add a class on the input component and target the suffix icon.