Skip to content

Instantly share code, notes, and snippets.

@chrisobriensp
Last active January 31, 2017 15:14
Show Gist options
  • Select an option

  • Save chrisobriensp/acbebf3fbae735e427c352fd390e1b21 to your computer and use it in GitHub Desktop.

Select an option

Save chrisobriensp/acbebf3fbae735e427c352fd390e1b21 to your computer and use it in GitHub Desktop.
An extract showing different button types you can use in SPFx web part properties (from getPropertyPaneConfiguration() method).
groupFields: [
PropertyPaneButton('', {
text: "Normal button",
buttonType: PropertyPaneButtonType.Normal,
onClick: this.cobWPPropButtonClick
}),
PropertyPaneHorizontalRule(),
PropertyPaneButton('', {
text: "Primary button",
buttonType: PropertyPaneButtonType.Primary,
onClick: this.cobWPPropButtonClick
}),
PropertyPaneHorizontalRule(),
PropertyPaneButton('btnHero', {
text: "Hero button ('Add' icon)",
buttonType: PropertyPaneButtonType.Hero,
icon: 'Add',
onClick: this.heroButtonClick,
}),
PropertyPaneHorizontalRule(),
PropertyPaneButton('', {
text: "Command button",
buttonType: PropertyPaneButtonType.Command,
onClick: this.cobWPPropButtonClick,
}),
PropertyPaneHorizontalRule(),
PropertyPaneButton('', {
text: "Compound button",
buttonType: PropertyPaneButtonType.Compound,
description: 'With some descriptive text',
onClick: this.cobWPPropButtonClick,
}),
PropertyPaneHorizontalRule(),
PropertyPaneButton('', {
text: "Icon button ('AddFriend' icon)",
buttonType: PropertyPaneButtonType.Icon,
icon: 'AddFriend',
onClick: this.cobWPPropButtonClick
})
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment