@dreamworld/dw-button
v3.0.5
Published
A button web component created using [`mwc-button`](https://www.webcomponents.org/element/@material/mwc-button)
Downloads
424
Keywords
Readme
dw-button
A button web component created using mwc-button
Demo
Install
npm install @dreamworld/dw-button
Usage
import '@dreamworld/dw-button/dw-button.js';
<dw-button label="OK"></dw-button>
Colors
Button is rendered by default in Primary color. It can be rendered in secondary, error or text color too. For that
add corresponding class (secondary
, error
and text
) to the button. e.g.
<dw-button label="OK" class="secondary"></dw-button>
it's actually main reason for creating extension of
mwc-button
.
Styles
- To show button in outlined style add
outlined
attribute. - To show button in filled style, add
filled
attribute. - Additionally
raised
attribute can be used to show elevated button. Asoutlined
button will never be raised, this doesn't work withoutlined
style.
Disable
Add disabled
attribute to make a button disabled.
Known Issues
- It's not possible to show Normal + Raised button in Primary color. It's due to the Custom CSS Property names
used by
mwc-button
element.