Skip to content

Instantly share code, notes, and snippets.

@devshahani
Last active July 11, 2018 01:54
Show Gist options
  • Save devshahani/f660ef959da0878d1072bfdfefada139 to your computer and use it in GitHub Desktop.
Save devshahani/f660ef959da0878d1072bfdfefada139 to your computer and use it in GitHub Desktop.
Polaris primaryAction example
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