-
Notifications
You must be signed in to change notification settings - Fork 2
Button
A Button indicates a possible interaction. A standard Button element in Evolve usally consists of an onClick event along with some text and an icon.
The props needed for this component are listed and explained below:
-
icon
- This prop must be astring
and will add the classname of icon-[icon], e.g. "icon-star" -
iconPostion
- This prop must be astring
. Without this prop on your component, the icon at default is postioned on the left side. You may only position the icon to the left or to the right. -
text
- This prop must be astring
. This is the main text that will displayed on the button. -
className
- This prop must be astring
. You have the ability to give your button a specific className. -
onClick
- This prop must be afunction
. -
type
- This prop must be astring
. -
isSmall
- This prop must be aboolean
. Use this to have a smaller version of the component
<Button
icon="key"
iconPosition="left"
text="Primary Button"
type="primary"
className="button-component"
onClick={this.onClick}/>
// ...React Component
onClick: function() {
console.log('this button has been clicked');
}