Last active
July 11, 2018 01:54
-
-
Save devshahani/f660ef959da0878d1072bfdfefada139 to your computer and use it in GitHub Desktop.
Polaris primaryAction example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyReactComponent extends Component { | |
constructor(props) { | |
super(props); | |
this.myTestFunction = this.myTestFunction.bind(this); | |
} | |
myTestFunction(){ | |
alert("hello") | |
} | |
render() { | |
return ( | |
<Page title="My Page" | |
primaryAction={{ | |
content: 'Do Something', | |
onAction: this.myTestFunction | |
}} | |
/> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment