|
Download wp-calypso/client/devdocs/docs-example/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 651 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/devdocs/docs-example/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/devdocs/docs-example/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/devdocs/docs-example/README.md
651 Bytes
DocsExample
This component is used to implement a skeleton for components examples which are generally showcased in the devdocs.
How to use
import DocsExample from 'calypso/devdocs/design/docs-example';
function render() {
return (
<DocsExample
usageStats={ this.props.usageStats }
toggleHandler={ this.toggleMyComponent }
toggleText={ toggleText }
>
{ this.renderExamples() }
</DocsExample>
);
}
Props
usageStats: (object) An object containing the usage stats e.g.{ count: 10 }.toggleHandler: (func) A function to toggle the example state.toggleText: (string) Text for the toggle button.