0.2.5 • Published 3 years ago
@dpa-id-components/ui-icon-button v0.2.5
@dpa-id-components/ui-icon-button
UiIconButtonVue 2.x input component based on the dpa Design Kit
Installation
yarn add @dpa-id-components/ui-icon-buttonUsage
<!-- SomeComponent.vue using UiIconButton -->
<template>
<ui-icon-button title="Icon button">
<div v-html="svgIcon"></div>
</ui-icon-button>
</template>
<script>
import UiIconButton from "@dpa-id-components/ui-icon-button";
import svgIvon from "./icon.svg"; // Vue imports SVGs as strings by default
export default {
components: {
UiIconButton,
},
data() {
return { svgIcon };
}
};
</script>Demo
View a demo of <ui-icon-button> on Storybook
API
Props
| Name | Type | Default | Description |
|---|---|---|---|
title | String | Button | Text description/title of the icon button |
Events
| Name | Type | Description |
|---|---|---|
click | ClickEvent | triggerd when the button is clicked |
Slots
| Name | Description |
|---|---|
default | Dfault slot for the SVG icon |