feat: Creates add button component for label (#2223)

This commit is contained in:
Sivin Varghese 2021-05-06 19:33:36 +05:30 committed by GitHub
parent 6245a10a70
commit 5c80d0ac42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,19 @@
import { action } from '@storybook/addon-actions';
import AddLabel from './AddLabel';
export default {
title: 'Components/Label/Add Button',
component: AddLabel,
argTypes: {},
};
const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { AddLabel },
template: '<add-label v-bind="$props" @add="onClick"></add-label>',
});
export const AddButton = Template.bind({});
AddButton.args = {
onClick: action('opened'),
};

View file

@ -0,0 +1,25 @@
<template>
<div>
<woot-button
variant="hollow"
size="tiny"
icon="ion-plus-round"
color-scheme="secondary"
@click="toggleLabels"
>
{{ $t('CONTACT_PANEL.LABELS.MODAL.ADD_BUTTON') }}
</woot-button>
</div>
</template>
<script>
export default {
methods: {
toggleLabels() {
this.$emit('add');
},
},
};
</script>
<style lang="scss" scoped></style>