Skip to content

Commit

Permalink
fix(QButton): use "regular" instead "medium" in prop "size" (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey authored Jun 27, 2022
1 parent 663612f commit 12d1a29
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/qComponents/QButton/src/QButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import type {
const defaultPropTypeValue = 'default';
const defaultPropThemeValue = 'primary';
const defaultPropSizeValue = 'medium';
const defaultPropSizeValue = 'regular';
export default defineComponent({
name: 'QButton',
Expand All @@ -76,7 +76,7 @@ export default defineComponent({
size: {
type: String as PropType<QButtonPropSize>,
default: defaultPropSizeValue,
validator: validateArray<QButtonPropSize>(['small', 'medium'])
validator: validateArray<QButtonPropSize>(['small', 'regular'])
},
/**
Expand Down
2 changes: 1 addition & 1 deletion src/qComponents/QButton/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ClassValue>;
export type QButtonPropNativeType = Nullable<NativeType>;
export type QButtonPropLoading = Nullable<boolean>;
Expand Down
14 changes: 7 additions & 7 deletions stories/components/QButton.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const storyMetadata: Meta = {
control: { type: 'select' }
},
size: {
options: ['small', 'medium'],
options: ['small', 'regular'],
control: { type: 'select' }
},
disabled: {
Expand Down Expand Up @@ -70,47 +70,47 @@ ThemePrimary.args = {
theme: 'primary',
type: 'default',
label: 'Primary theme',
size: 'medium'
size: 'regular'
};

export const ThemeSecondary = Template.bind({});
ThemeSecondary.args = {
theme: 'secondary',
type: 'default',
label: 'Secondary theme',
size: 'medium'
size: 'regular'
};

export const ThemeLink = Template.bind({});
ThemeLink.args = {
theme: 'link',
type: 'default',
label: 'Link theme',
size: 'medium'
size: 'regular'
};

export const IconPrimary = Template.bind({});
IconPrimary.args = {
theme: 'primary',
type: 'icon',
icon: 'q-icon-bell',
size: 'medium'
size: 'regular'
};

export const IconSecondary = Template.bind({});
IconSecondary.args = {
theme: 'secondary',
type: 'icon',
icon: 'q-icon-bell',
size: 'medium'
size: 'regular'
};

export const IconLink = Template.bind({});
IconLink.args = {
theme: 'link',
type: 'icon',
icon: 'q-icon-bell',
size: 'medium'
size: 'regular'
};

export default storyMetadata;
4 changes: 2 additions & 2 deletions vuepress-docs/docs/components/QButton.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ Result:

### size

- Type: `'medium'` | `'small'`
- Default: `'medium'`
- Type: `'regular'` | `'small'`
- Default: `'regular'`

Changes button size.

Expand Down

0 comments on commit 12d1a29

Please sign in to comment.