From 12d1a29107951ddd038fa6d98afbcf9df8a0f452 Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 27 Jun 2022 18:01:45 +0500 Subject: [PATCH] fix(QButton): use "regular" instead "medium" in prop "size" (#315) --- src/qComponents/QButton/src/QButton.vue | 4 ++-- src/qComponents/QButton/src/types.ts | 2 +- stories/components/QButton.stories.ts | 14 +++++++------- vuepress-docs/docs/components/QButton.md | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/qComponents/QButton/src/QButton.vue b/src/qComponents/QButton/src/QButton.vue index dfdad94c..6fa9a615 100644 --- a/src/qComponents/QButton/src/QButton.vue +++ b/src/qComponents/QButton/src/QButton.vue @@ -49,7 +49,7 @@ import type { const defaultPropTypeValue = 'default'; const defaultPropThemeValue = 'primary'; -const defaultPropSizeValue = 'medium'; +const defaultPropSizeValue = 'regular'; export default defineComponent({ name: 'QButton', @@ -76,7 +76,7 @@ export default defineComponent({ size: { type: String as PropType, default: defaultPropSizeValue, - validator: validateArray(['small', 'medium']) + validator: validateArray(['small', 'regular']) }, /** diff --git a/src/qComponents/QButton/src/types.ts b/src/qComponents/QButton/src/types.ts index 55b24c98..afb90e55 100644 --- a/src/qComponents/QButton/src/types.ts +++ b/src/qComponents/QButton/src/types.ts @@ -6,7 +6,7 @@ type NativeType = 'button' | 'submit' | 'reset'; export type QButtonPropType = Nullable<'default' | 'icon'>; export type QButtonPropTheme = Nullable<'primary' | 'secondary' | 'link'>; -export type QButtonPropSize = Nullable<'small' | 'medium'>; +export type QButtonPropSize = Nullable<'small' | 'regular'>; export type QButtonPropIcon = Nullable; export type QButtonPropNativeType = Nullable; export type QButtonPropLoading = Nullable; diff --git a/stories/components/QButton.stories.ts b/stories/components/QButton.stories.ts index 4ffc6d9d..5b0a2c69 100644 --- a/stories/components/QButton.stories.ts +++ b/stories/components/QButton.stories.ts @@ -17,7 +17,7 @@ const storyMetadata: Meta = { control: { type: 'select' } }, size: { - options: ['small', 'medium'], + options: ['small', 'regular'], control: { type: 'select' } }, disabled: { @@ -70,7 +70,7 @@ ThemePrimary.args = { theme: 'primary', type: 'default', label: 'Primary theme', - size: 'medium' + size: 'regular' }; export const ThemeSecondary = Template.bind({}); @@ -78,7 +78,7 @@ ThemeSecondary.args = { theme: 'secondary', type: 'default', label: 'Secondary theme', - size: 'medium' + size: 'regular' }; export const ThemeLink = Template.bind({}); @@ -86,7 +86,7 @@ ThemeLink.args = { theme: 'link', type: 'default', label: 'Link theme', - size: 'medium' + size: 'regular' }; export const IconPrimary = Template.bind({}); @@ -94,7 +94,7 @@ IconPrimary.args = { theme: 'primary', type: 'icon', icon: 'q-icon-bell', - size: 'medium' + size: 'regular' }; export const IconSecondary = Template.bind({}); @@ -102,7 +102,7 @@ IconSecondary.args = { theme: 'secondary', type: 'icon', icon: 'q-icon-bell', - size: 'medium' + size: 'regular' }; export const IconLink = Template.bind({}); @@ -110,7 +110,7 @@ IconLink.args = { theme: 'link', type: 'icon', icon: 'q-icon-bell', - size: 'medium' + size: 'regular' }; export default storyMetadata; diff --git a/vuepress-docs/docs/components/QButton.md b/vuepress-docs/docs/components/QButton.md index 6f213e89..c6e3c9e4 100644 --- a/vuepress-docs/docs/components/QButton.md +++ b/vuepress-docs/docs/components/QButton.md @@ -90,8 +90,8 @@ Result: ### size -- Type: `'medium'` | `'small'` -- Default: `'medium'` +- Type: `'regular'` | `'small'` +- Default: `'regular'` Changes button size.