2.0.1 • Published 4 years ago

@chameleon-ds/radio v2.0.1

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

Chameleon Radio

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

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

Properties

Property NameType(s)Default ValueDescription
labelString""The radio's label
nameString"cha-radio"The radio's form name
checkedBooleanfalseA Boolean which, if true, indicates that the radio is selected
valueString""The radio's current value
disabledBooleanfalseA Boolean to disable radio button
readonlyBooleanfalseA Boolean attribute which, if true, indicates that the radio button cannot be edited
invalidBooleanfalseInvalid boolean to allow validity access from higher level form errors

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-radio
      label="${label}"
      ?checked="${checked}"
      ?disabled="${disabled}"
      ?invalid="${invalid}"
    ></chameleon-radio>
  `;
};
2.0.1

4 years ago

2.0.0

4 years ago

1.3.2

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.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

0.1.2

5 years ago

0.1.1

5 years ago