0.8.0 • Published 1 year ago

@dpa-id-components/ui-button v0.8.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

@dpa-id-components/ui-button

UiButton Vue 2.x input component based on the dpa Design Kit

Installation

yarn add @dpa-id-components/ui-button

Usage

<!-- SomeComponent.vue using UiButton -->
<template>
  <ui-button :size="medium" :color="blue" :disabled="false"
    :to="myfunction()"
  >
  <!-- Custom button text in default slot -->
  Click me
  </ui-button>
</template>

<script>
  import UiButton from "@dpa-id-components/ui-component";

  export default {
    components: {
      UiButton,
    }
  };
</script>

Demo

View a demo of <ui-button> on Storybook

API

Props

NameTypeDefaultDescription
sizeStringmediumSets the size attribute of the Button
colorStringblueSets the color attribute of the Button
disabledBooleanfalseWether the button is disabled
toObjectnullvue-router route object, renders button as router-link
hrefString""The href attribute, renders button as a tag
roundedBooleanfalseWhether a rounded border-radius is applied to the button
textClassesString""Additional classes to override default button text styles

Events

NameTypeDescription
hoverHoverEventEmitted when the button is hovered
clickClickEventtriggerd when the button is clicked

Slots

NameDescription
defaultslot for the rendering the button's content
0.8.0

1 year ago

0.7.0

1 year ago

0.5.0

2 years ago

0.4.3

2 years ago

0.6.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.3.1

2 years ago

0.2.4

2 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago