Skip to content
Snippets Groups Projects
Commit 6480193c authored by Дмитрий Малюгин's avatar Дмитрий Малюгин :clock4:
Browse files

feat: init 'Cropper'

parent 098be760
No related branches found
No related tags found
1 merge request!6Finish "UI-library v1.0.0"
...@@ -182,6 +182,10 @@ export interface IPopupProps { ...@@ -182,6 +182,10 @@ export interface IPopupProps {
left?: number; left?: number;
} }
export interface ICropperProps {
size?: TSize;
}
export interface IColorPickerProps { export interface IColorPickerProps {
size?: TSize; size?: TSize;
disabled?: boolean; disabled?: boolean;
......
...@@ -9,7 +9,7 @@ const meta: Meta = { ...@@ -9,7 +9,7 @@ const meta: Meta = {
parameters: { parameters: {
docs: { docs: {
description: { description: {
component: 'A component to define number inputs with a dial.', component: 'A component to pick color. Can be with button.',
}, },
}, },
}, },
......
import type { Meta, StoryObj } from '@storybook/vue3';
import Cropper from './Cropper.vue';
const meta: Meta = {
title: 'Components/Cropper',
component: Cropper,
tags: ['pick'],
parameters: {
docs: {
description: {
component: 'A component to pick color. Can be with button.',
},
},
},
argTypes: {
buttonProps: { control: 'object' },
sameButtonColor: { control: 'boolean' },
disabled: { control: 'boolean' },
size: { control: 'select', options: ['small', 'normal', 'large', 'huge'] },
},
} satisfies Meta<typeof Cropper>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Simple: Story = {
args: {},
};
export const Full: Story = {
args: {
buttonProps: {
label: 'Pick color!',
theme: 'red',
textStyle: 'bold',
},
size: 'large',
sameButtonColor: true,
},
};
<script setup lang="ts">
import type { ICropperProps } from '@interfaces/componentsProps';
const props = withDefaults(defineProps<ICropperProps>(), {
size: 'normal',
disabled: false,
});
</script>
<template>
<section class="container"></section>
</template>
<style scoped>
.container {
}
</style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment