1.1.0 • Published 5 years ago

dmp-btn-toggle v1.1.0

Weekly downloads
6
License
-
Repository
-
Last release
5 years ago

\<dmp-btn-toggle>

Install

    npm i --save dmp-btn-toggle

Description

This component is a toggle button. It change state when is clicked If the component has an attribute featured, and slot featured has an svg the component show a clickable icon to toggle featured-selected property.

CSS Custom properties

NameDefaultDescription
--backgroundColorlightblue
--backgroundSelected#52b7d8
--featuredBackgroundlightblue
--featuredBackgroundSelectedgold
--featuredStrokeColortransparent
--featuredStrokeColorSelectedtransparent

Properties

NameDescriptionFlow
valueText in the buttonIN
ownIdown id to use if item is in the listIN
selectedflag to check if button is on/offIN/OUT
featuredflag to check show/hide featured selected optionIN
featuredSelectedflag to check if button featured is on/offIN/OUT
disabledflag to check if buttons is disabled/enabledIN/OUT

Methods

NameDescription
checkDisabledreturns component status
validationValidate component

Events

Install the Polymer-CLI

First, make sure you have the Polymer CLI and npm (packaged with Node.js) installed. Run npm install to install your element's dependencies, then run polymer serve to serve your element locally.

Viewing Your Element

$ polymer serve

Running Tests

$ polymer test

Your application is already set up to be tested via web-component-tester. Run polymer test to run your application's test suite locally.