@dreamworld/dw-button

3.0.5 • Public • Published

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. As outlined button will never be raised, this doesn't work with outlined 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.

Readme

Keywords

none

Package Sidebar

Install

npm i @dreamworld/dw-button

Weekly Downloads

147

Version

3.0.5

License

ISC

Unpacked Size

12 kB

Total Files

6

Last publish

Collaborators

  • chiragmoradiya
  • chetang7
  • ajay-dhameliya
  • dw-devops