0.1.7 • Published 9 months ago

@phase2/outline-button v0.1.7

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
9 months ago

outline-button

The Outline Button component

Properties

PropertyAttributeTypeDefaultDescription
buttonLabelbutton-labelstringARIA label attribute to pass down to the resulting button or aelement. This is required for accessibility if we use a buttonwith an icon only.
buttonSizebutton-sizestring"medium"The button size to use.
buttonTargetbutton-targetstringThe target to use for a link, used in conjunction with the url attribute.
buttonUrlbutton-urlstringThe url to use for a link. This will render an anchor element.Do not set this prop if you want to render a button element.
buttonVariantbutton-variantstring"primary"The button style variant to use.
hasLeftIconboolean
hasRightIconboolean
isDisabledis-disabledbooleanfalseWhether the button is disabled. Only applies toimplementations not using the url property
onClickonClick() => voidA click handler to be passed only to onClick. DO NOT USE @click on this component.
onKeyUponKeyUp() => voidA keyUp handler to be passed to the onKeyUp. DO NOT USE @keyup on this component.
slotsSlotController"new SlotController(\n this, // This, the host element.\n false // To shift or not to shift LightDom nodes to ShadowDOM.\n )"

Methods

MethodTypeDescription
iconTemplate(exists: boolean, slot: string): TemplateResult<ResultType> \| nullIcon templateexists: Whether the icon slot exists.slot: The slot name to use.

Slots

NameDescription
default slot, used for button text.
leftslot used for left side icon.
rightslot used for right side icon.