isHoverEnabled
Commons
stable
Type guard that returns true when hover interactions should be active: when the value is undefined (default-on) or any truthy value. Falsy values (false, 0, "") disable hover.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- valuerequisany
- The raw prop value controlling hover. undefined means the prop was not set and hover defaults to enabled; any falsy value other than undefined disables it.
API
Valeur de retour
La valeur retournée par cet util.
- true when hover is enabled (value is undefined or truthy), narrowing the type to true. false otherwise.
Usage
Exemples
Extraits de code prêts à coller.
Checking hover state from a prop