@accessible/disclosure
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -5,2 +5,8 @@ # Changelog | ||
### [2.0.2](https://github.com/accessible-ui/disclosure/compare/v2.0.1...v2.0.2) (2020-07-12) | ||
### Bug Fixes | ||
- add comment to useDisclosure hook ([7448843](https://github.com/accessible-ui/disclosure/commit/74488432f5684ff7659218ced335e64122afcb00)) | ||
### [2.0.1](https://github.com/accessible-ui/disclosure/compare/v2.0.0...v2.0.1) (2020-07-12) | ||
@@ -7,0 +13,0 @@ |
@@ -46,2 +46,5 @@ "use strict"; | ||
}); | ||
/** | ||
* This hook provides the current value of the disclosure's context object | ||
*/ | ||
@@ -48,0 +51,0 @@ function useDisclosure() { |
@@ -18,2 +18,6 @@ import * as React from 'react'; | ||
}); | ||
/** | ||
* This hook provides the current value of the disclosure's context object | ||
*/ | ||
export function useDisclosure() { | ||
@@ -20,0 +24,0 @@ return React.useContext(DisclosureContext); |
@@ -442,2 +442,6 @@ (function (global, factory) { | ||
}); | ||
/** | ||
* This hook provides the current value of the disclosure's context object | ||
*/ | ||
function useDisclosure() { | ||
@@ -444,0 +448,0 @@ return React.useContext(DisclosureContext); |
{ | ||
"name": "@accessible/disclosure", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"homepage": "https://github.com/accessible-ui/disclosure#readme", | ||
@@ -5,0 +5,0 @@ "repository": "github:accessible-ui/disclosure", |
@@ -45,3 +45,3 @@ <hr> | ||
[Check out the example on CodeSandbox](https://codesandbox.io/s/accessibledisclosure-example-8pkd2) | ||
[Check out the example on **CodeSandbox**](https://codesandbox.io/s/accessibledisclosure-example-8pkd2) | ||
@@ -84,8 +84,8 @@ ```jsx harmony | ||
| Hook | Description | | ||
| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| [`useDisclosure()`](#usedisclosure) | This hook provides the value of the disclosure's [DisclosureContextValue object](#disclosurecontextvalue). | | ||
| [`useTarget()`](#usetargettarget-options) | A React hook for creating a headless disclosure target to [WAI-ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-faq.html). | | ||
| [`useTrigger()`](#usetriggertarget-options) | A React hook for creating a headless disclosure trigger to [WAI-ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-faq.html). | | ||
| [`useCloseButton()`](#useclosebuttontarget-ptions) | A React hook for creating a headless close button to [WAI-ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-faq.html). | | ||
| Hook | Description | | ||
| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| [`useDisclosure()`](#usedisclosure) | This hook provides the value of the disclosure's [DisclosureContextValue object](#disclosurecontextvalue). | | ||
| [`useTarget()`](#usetargettarget-options) | A React hook for creating a headless disclosure target to [WAI-ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-faq.html). | | ||
| [`useTrigger()`](#usetriggertarget-options) | A React hook for creating a headless disclosure trigger to [WAI-ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-faq.html). | | ||
| [`useCloseButton()`](#useclosebuttontarget-options) | A React hook for creating a headless close button to [WAI-ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-faq.html). | | ||
@@ -107,3 +107,3 @@ ### <Disclosure> | ||
### useTarget(target, options) | ||
### useTarget(target, options?) | ||
@@ -218,3 +218,3 @@ A React hook for creating a headless disclosure target to [WAI-ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-faq.html). | ||
### useTrigger(target, options) | ||
### useTrigger(target, options?) | ||
@@ -322,3 +322,3 @@ A React hook for creating a headless disclosure trigger to [WAI-ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-faq.html). | ||
### useCloseButton(target, options) | ||
### useCloseButton(target, options?) | ||
@@ -325,0 +325,0 @@ A React hook for creating a headless close button to [WAI-ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-faq.html). |
import * as React from 'react' | ||
import type {PortalizeProps} from 'react-portalize' | ||
/** | ||
* This hook provides the current value of the disclosure's context object | ||
*/ | ||
export declare function useDisclosure(): DisclosureContextValue | ||
@@ -4,0 +7,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
242364
2598