react-code-dataset / wp-calypso /client /my-sites /stats /features /modules /shared /stats-empty-action-utm-builder.tsx
react-code-dataset / wp-calypso /client /my-sites /stats /features /modules /shared /stats-empty-action-utm-builder.tsx
Download wp-calypso/client/my-sites/stats/features/modules/shared/stats-empty-action-utm-builder.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 787 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/my-sites/stats/features/modules/shared/stats-empty-action-utm-builder.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/my-sites/stats/features/modules/shared/stats-empty-action-utm-builder.tsx
-
curl -L -o stats-empty-action-utm-builder.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/my-sites/stats/features/modules/shared/stats-empty-action-utm-builder.tsx
787 Bytes
| import { link } from '@wordpress/icons'; | |
| import { useTranslate } from 'i18n-calypso'; | |
| import React from 'react'; | |
| import EmptyStateAction from 'calypso/my-sites/stats/components/empty-state-action'; | |
| type StatsEmptyActionUTMBuilderProps = { | |
| from: string; | |
| onClick: () => void; | |
| }; | |
| const StatsEmptyActionUTMBuilder: React.FC< StatsEmptyActionUTMBuilderProps > = ( { | |
| from, | |
| onClick, | |
| } ) => { | |
| const translate = useTranslate(); | |
| return ( | |
| <EmptyStateAction | |
| icon={ link } | |
| text={ translate( 'Generate URL with codes using our builder' ) } | |
| analyticsDetails={ { | |
| from: from, | |
| feature: 'utm_builder', | |
| } } | |
| onClick={ () => { | |
| // analytics event tracting handled in EmptyStateAction component | |
| onClick(); | |
| } } | |
| /> | |
| ); | |
| }; | |
| export default StatsEmptyActionUTMBuilder; | |