use-disabled
Synchronize the state of the disabled prop with the fieldset tag
Inherit the disabled status of a parent tag type fieldset, under certain rules:
- The label must be on the lightDOM. 
- The component that uses this hook must declare the prop - {disabled: Boolean}.
Import
import { useDisabled } from "@atomico/hooks/use-disabled";Sintaxis
const disabled:boolean = useDisabled(matches?: string = "fieldset");Where:
- matches: Optional string, allows to change the search of the parent tag fieldset for another tag or selector compatible with Element.matches.
Example
Last updated
Was this helpful?
