2.0.1 • Published 4 years ago

@chameleon-ds/checkbox v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Chameleon Checkbox

import { html } from "@open-wc/demoing-storybook";
import { withKnobs, text, boolean } from "@open-wc/demoing-storybook";
import "./chameleon-checkbox.js";

export default {
  title: "Components|Form Elements/Checkbox",
  component: "chameleon-checkbox",
  decorators: [withKnobs],
  options: { selectedPanel: "storybookjs/docs/panel" },
};

Properties

Property NameType(s)Default ValueDescription
labelString""The checkbox's label
nameString"cha-checkbox"The checkbox's form name
checkedBooleanfalseA Boolean which, if true, indicates that the checkbox is selected
valueString""The checkbox's current value
readonlyBooleanfalseA Boolean attribute which, if true, indicates that the checkbox cannot be edited
disabledBooleanfalseThe checkbox's enabled/disabled status
invalidBooleanfalseInvalid boolean to allow validity access from higher level form errors
requiredbooleanfalseA Boolean to indicate the input is required

Examples

Default

export const Default = () => {
  const label = text("Label", "");
  const checked = boolean("Checked", true);
  const disabled = boolean("Disabled", false);
  const invalid = boolean("Invalid", false);

  return html`
    <chameleon-checkbox
      label="${label}"
      ?checked="${checked}"
      ?disabled="${disabled}"
      ?invalid="${invalid}"
    ></chameleon-checkbox>
  `;
};
2.0.1

4 years ago

2.0.0

4 years ago

1.4.2

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.2.1

4 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago