Download wp-calypso/client/blocks/product-plan-overlap-notices/docs/example.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/blocks/product-plan-overlap-notices/docs/example.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/blocks/product-plan-overlap-notices/docs/example.jsx
-
curl -L -o example.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/blocks/product-plan-overlap-notices/docs/example.jsx
1.01 kB
| import { JETPACK_PRODUCTS_LIST, JETPACK_PLANS } from '@automattic/calypso-products'; | |
| import { Component } from 'react'; | |
| import SitesDropdown from 'calypso/components/sites-dropdown'; | |
| import ProductPlanOverlapNotices from '../'; | |
| class ProductPlanOverlapNoticesExample extends Component { | |
| state = { | |
| siteId: 0, | |
| }; | |
| render() { | |
| return ( | |
| <div style={ { maxWidth: 520, margin: '0 auto' } }> | |
| <div style={ { maxWidth: 300, margin: '0 auto 10px' } }> | |
| <SitesDropdown onSiteSelect={ ( siteId ) => this.setState( { siteId } ) } /> | |
| </div> | |
| { this.state.siteId ? ( | |
| <ProductPlanOverlapNotices | |
| plans={ JETPACK_PLANS } | |
| products={ JETPACK_PRODUCTS_LIST } | |
| siteId={ this.state.siteId } | |
| /> | |
| ) : ( | |
| <p style={ { textAlign: 'center' } }> | |
| Please, select a Jetpack site to experience the full demo. | |
| </p> | |
| ) } | |
| </div> | |
| ); | |
| } | |
| } | |
| ProductPlanOverlapNoticesExample.displayName = 'ProductPlanOverlapNotices'; | |
| export default ProductPlanOverlapNoticesExample; | |