-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deprecate disclosure & share stories
- Loading branch information
Showing
8 changed files
with
15 additions
and
178 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,6 @@ | ||
import { Meta, Canvas, Controls } from '@storybook/blocks'; | ||
import * as Disclosure from './Disclosure.stories'; | ||
import { Meta } from '@storybook/blocks'; | ||
|
||
<Meta of={Disclosure} /> | ||
<Meta title="Components/Disclosure (Or Show|Hide)" /> | ||
|
||
# Disclosure | ||
- Shows/hides content using the HTML `hidden` attribute. | ||
- Use this component when [accordion](/story/components-accordion--accordion) or [tabs](/story/components-tabs--tabs) components cannot be used. | ||
- Also see the [ARIA APG disclosure pattern](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/). | ||
|
||
## Accessibility considerations | ||
- By adding the `data-disclosure-escape-key` attribute to the HTML, the `ESC` key can be used to hide the content. | ||
- Similarly, the `data-disclosure-click-outside` attribute hides the content when clicking anywhere outside the content. | ||
|
||
## Web component version | ||
- See the equivalent [`<webui-disclosure>`](/story/web-components-or-custom-elements-webui-disclosure--web-ui-disclosure) custom element. | ||
|
||
<Canvas of={Disclosure.Disclosure} /> | ||
<Controls of={Disclosure.Disclosure} /> | ||
- See the [`<webui-disclosure>`](/docs/web-components-or-custom-elements-webui-disclosure--docs) custom element. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,6 @@ | ||
import { Meta, Canvas } from '@storybook/blocks'; | ||
import * as Share from './Share.stories'; | ||
import { Meta } from '@storybook/blocks'; | ||
|
||
<Meta of={Share} /> | ||
<Meta title="Components/Share" /> | ||
|
||
# Share | ||
- Uses the [Web Share API](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share). | ||
- Fallback behaviour uses the [disclosure](/story/components-disclosure-or-show-hide--disclosure) pattern, and allows user to copy the URL. | ||
|
||
## Web component version | ||
- See the equivalent [`<webui-share>`](/story/web-components-or-custom-elements-webui-share--web-ui-share) custom element. | ||
|
||
## TODO | ||
- Replace fallback [document.execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) with [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API). | ||
|
||
<Canvas of={Share.Share} /> | ||
|
||
## Share another URL | ||
<Canvas of={Share.ShareAnotherUrl} /> | ||
- See the [`<webui-share>`](/docs/web-components-or-custom-elements-webui-share--docs) custom element. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters