Skip to content

Commit

Permalink
fix(rounded): apply rounded-0 for false value
Browse files Browse the repository at this point in the history
fixes #16601
  • Loading branch information
johnleider committed Apr 9, 2024
1 parent 8977720 commit 3feeb77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions packages/vuetify/src/composables/__tests__/rounded.spec.ts
Expand Up @@ -25,17 +25,18 @@ describe('rounded.ts', () => {
[{}, []],
[{ rounded: null }, []],
[{ rounded: 1 }, []],
// // Rounded only
// Rounded only
[{ rounded: true }, ['foo--rounded']],
[{ rounded: '' }, ['foo--rounded']],
// // Rounded with 0
// Rounded with 0
[{ rounded: '0' }, ['rounded-0']],
[{ rounded: 0 }, ['rounded-0']],
// // Rounded with a word
[{ rounded: false }, ['rounded-0']],
// Rounded with a word
[{ rounded: 'circle' }, ['rounded-circle']],
[{ rounded: 'shaped' }, ['rounded-shaped']],
[{ rounded: 'pill' }, ['rounded-pill']],
// // Corner and axis rounded
// Corner and axis rounded
[{ rounded: 'te-xl be-lg' }, ['rounded-te-xl', 'rounded-be-lg']],
] as RoundedProps[])('should return correct rounded classes', (props: RoundedProps, expected: any) => {
const { roundedClasses } = useRounded(props, 'foo')
Expand Down
2 changes: 1 addition & 1 deletion packages/vuetify/src/composables/rounded.ts
Expand Up @@ -43,7 +43,7 @@ export function useRounded (
for (const value of String(rounded).split(' ')) {
classes.push(`rounded-${value}`)
}
} else if (tile) {
} else if (tile || rounded === false) {
classes.push('rounded-0')
}

Expand Down

0 comments on commit 3feeb77

Please sign in to comment.