From 0937335f1446ca367b9d1d9f7efbd5ca46a6be95 Mon Sep 17 00:00:00 2001 From: Carlos Mondragon Date: Wed, 10 Oct 2018 17:07:05 -0700 Subject: [PATCH] Add onClick handler to CTA. --- public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx | 1 + public/app/core/components/EmptyListCTA/EmptyListCTA.tsx | 3 ++- .../EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx b/public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx index 4af60f3c839..ff92dc0d5c7 100644 --- a/public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx +++ b/public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx @@ -7,6 +7,7 @@ const model = { buttonIcon: 'ga css class', buttonLink: 'http://url/to/destination', buttonTitle: 'Click me', + onClick: 'handler', proTip: 'This is a tip', proTipLink: 'http://url/to/tip/destination', proTipLinkTitle: 'Learn more', diff --git a/public/app/core/components/EmptyListCTA/EmptyListCTA.tsx b/public/app/core/components/EmptyListCTA/EmptyListCTA.tsx index 5ece360e36a..ae0e39cc26d 100644 --- a/public/app/core/components/EmptyListCTA/EmptyListCTA.tsx +++ b/public/app/core/components/EmptyListCTA/EmptyListCTA.tsx @@ -11,6 +11,7 @@ class EmptyListCTA extends Component { buttonIcon, buttonLink, buttonTitle, + onClick, proTip, proTipLink, proTipLinkTitle, @@ -19,7 +20,7 @@ class EmptyListCTA extends Component { return (
{title}
- + {buttonTitle} diff --git a/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap b/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap index 6d47c984d5e..fc76544b112 100644 --- a/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap +++ b/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap @@ -12,6 +12,7 @@ exports[`EmptyListCTA renders correctly 1`] = `