mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add onClick handler to CTA.
This commit is contained in:
parent
af985743d2
commit
0937335f14
@ -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',
|
||||
|
@ -11,6 +11,7 @@ class EmptyListCTA extends Component<Props, any> {
|
||||
buttonIcon,
|
||||
buttonLink,
|
||||
buttonTitle,
|
||||
onClick,
|
||||
proTip,
|
||||
proTipLink,
|
||||
proTipLinkTitle,
|
||||
@ -19,7 +20,7 @@ class EmptyListCTA extends Component<Props, any> {
|
||||
return (
|
||||
<div className="empty-list-cta">
|
||||
<div className="empty-list-cta__title">{title}</div>
|
||||
<a href={buttonLink} className="empty-list-cta__button btn btn-xlarge btn-success">
|
||||
<a onClick={onClick} href={buttonLink} className="empty-list-cta__button btn btn-xlarge btn-success">
|
||||
<i className={buttonIcon} />
|
||||
{buttonTitle}
|
||||
</a>
|
||||
|
@ -12,6 +12,7 @@ exports[`EmptyListCTA renders correctly 1`] = `
|
||||
<a
|
||||
className="empty-list-cta__button btn btn-xlarge btn-success"
|
||||
href="http://url/to/destination"
|
||||
onClick="handler"
|
||||
>
|
||||
<i
|
||||
className="ga css class"
|
||||
|
Loading…
Reference in New Issue
Block a user