Buttons - PIWEEK/polymux GitHub Wiki
A button component is used for linking to other pages or dinamic actions like opening a dialog.
It can accepts two parameters:
- title optional: Sets the button name and title defaul: title
- type optional: Sets the button color
- Default: primary-color
- Success: It will show a success button
- Warning: It will show a warning button
- Error: It will show an error button
- Disabled: Will show a disabled button. The button will not link or notify anywhere
Depending on the action required to the button it should accept more parameters:
Linking
A button can be used for linking to other pages as with common links
<polymux-button title="Test" type="success" link="index.html"></polymux-button>
- link: The link it leads to.
Notifying elements
Some elements can accept notifications
Notifying the polimux-notification component
<polymux-button title="Test" type="success" notify="polymux-notification" notify-message"Yeah!"></polymux-button>
- notify: The component it notifies to. Some elements accept a notification like the polymux-notification components
- notify-message optional: An optional notification message that might be used by the component.