@evergreen-wc/eve-button
Button made with lit element
Last updated a year ago by hutchgrant .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @evergreen-wc/eve-button 
SYNC missed versions from official npm registry.

eve-button

An Evergreen Button Web Component

Demo

Install

npm i @evergreen-wc/eve-button

Usage

import { html, LitElement } from '@polymer/lit-element';
import '@evergreen-wc/eve-button';

class MyComponent extends LitElement {
  handleClick() {
    alert('button clicked!');
  }

  render() {

    const style = `
    :host .btn {
      color: white;
      background-color: red;
    }
    :host .btn:hover {
      color: red;
      background-color: white;
    }`;

    return html`
      <eve-button size="md" href="/docs" style="${style}">Medium href Button</eve-button>
      <eve-button size="md" .onClick="${this.handleClick.bind(this)}">Medium function Button</eve-button>
    `;
  }
}

Props

Property Description
size Set size of button. e.g. xs, sm, md, lg
href Set an anchor to navigate to on click
onClick Set a function to callback on click
style Set a custom stylesheet for a specific button

Styling

--primary-color: #007f1d;
--secondary-color:#fff;
--btn-background: transparent;
--btn-border-color: var(--primary-color);
--btn-text-color: var(--primary-color);
--btn-hover-background-color: var(--primary-color);
--btn-hover-text-color: var(--secondary-color);
--btn-hover-border-color: var(--primary-color);
--btn-border-radius: 5px

Current Tags

  • 0.0.9                                ...           latest (a year ago)

8 Versions

  • 0.0.9                                ...           a year ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |