@dpa-id-components/ui-icon-button
UiIconButton
Vue 2.x input component based on the dpa Design Kit
Installation
yarn add @dpa-id-components/ui-icon-button
Usage
<!-- 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 |