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

Add Dense property to QCard #17502

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add dense property to QCard
  • Loading branch information
jrking4 committed Sep 9, 2024
commit 3109e5b3c6caf19a053ce578618381192b5ea617
2 changes: 2 additions & 0 deletions ui/src/components/card/QCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default createComponent({
default: 'div'
},

dense: Boolean,
square: Boolean,
flat: Boolean,
bordered: Boolean
Expand All @@ -28,6 +29,7 @@ export default createComponent({
const classes = computed(() =>
'q-card'
+ (isDark.value === true ? ' q-card--dark q-dark' : '')
+ (props.dense === true ? ' q-card--dense' : '')
+ (props.bordered === true ? ' q-card--bordered' : '')
+ (props.square === true ? ' q-card--square no-border-radius' : '')
+ (props.flat === true ? ' q-card--flat no-shadow' : '')
Expand Down
4 changes: 4 additions & 0 deletions ui/src/components/card/QCard.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
"extends": "bordered"
},

"dense": {
"extends": "dense"
},

"tag": {
"extends": "tag",
"default": "'div'",
Expand Down
3 changes: 3 additions & 0 deletions ui/src/components/card/QCard.sass
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
&--vert
padding: 16px

.q-card--dense &--vert
padding: 2px 16px

&--horiz
> div,
> img
Expand Down