File size: 808 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
import { NoticeBanner } from '@automattic/components';
import { Button } from '@wordpress/components';
import { useTranslate } from 'i18n-calypso';
export const ReportUnavailable = ( {
isLaunching,
onLaunchSiteClick,
ctaText,
}: {
isLaunching: boolean;
onLaunchSiteClick(): void;
ctaText: string;
} ) => {
const translate = useTranslate();
return (
<NoticeBanner
level="info"
title={ translate( 'Launch your site to start measuring performance' ) }
hideCloseButton
actions={ [
<Button
disabled={ isLaunching }
isBusy={ isLaunching }
key="launch-site"
variant="primary"
onClick={ onLaunchSiteClick }
>
{ ctaText }
</Button>,
] }
>
{ translate( 'Performance statistics are only available for public sites.' ) }
</NoticeBanner>
);
};
|