Download wp-calypso/client/sites/settings/administration/tools/export-notice.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 705 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/sites/settings/administration/tools/export-notice.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/sites/settings/administration/tools/export-notice.tsx
-
curl -L -o export-notice.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/sites/settings/administration/tools/export-notice.tsx
705 Bytes
| import { translate } from 'i18n-calypso'; | |
| import { MouseEvent } from 'react'; | |
| import Notice from 'calypso/components/notice'; | |
| import NoticeAction from 'calypso/components/notice/notice-action'; | |
| export default function ExportNotice( { | |
| siteId, | |
| siteSlug, | |
| warningText, | |
| }: { | |
| siteId: number; | |
| siteSlug: string; | |
| warningText: string; | |
| } ) { | |
| const checkSiteLoaded = ( event: MouseEvent< HTMLAnchorElement > ) => { | |
| if ( ! siteId ) { | |
| event.preventDefault(); | |
| } | |
| }; | |
| return ( | |
| <Notice status="is-warning" showDismiss={ false } text={ warningText }> | |
| <NoticeAction onClick={ checkSiteLoaded } href={ `/export/${ siteSlug }` }> | |
| { translate( 'Export content' ) } | |
| </NoticeAction> | |
| </Notice> | |
| ); | |
| } | |