Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(QButton): use "regular" instead of "medium" in prop "size" #315

Merged
merged 2 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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