-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To be able to complete this in a11y way, KCheckbox will need to be updated to allow for more flexible label. Due to how KCheckbox is implemented it seems that currently there is no way how to set the card title as its checkbox label. There may be some more a11y requirements needed, to be discussed.
- Loading branch information
Showing
8 changed files
with
145 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<template> | ||
|
||
<li | ||
class="k-card-grid-item" | ||
:class="{ 'with-checkbox': $slots.checkbox }" | ||
:style="gridItemStyle" | ||
> | ||
<!-- @slot Optional slot for `KCheckbox` --> | ||
<div v-if="$slots.checkbox" class="checkbox"> | ||
<slot name="checkbox"></slot> | ||
</div> | ||
<!-- @slot Slot for `KCard`s --> | ||
<slot></slot> | ||
</li> | ||
|
||
</template> | ||
|
||
|
||
<script> | ||
import { inject } from '@vue/composition-api'; | ||
export default { | ||
name: 'KCardGridItem', | ||
setup() { | ||
// provided by `KCardGrid` | ||
const gridItemStyle = inject('gridItemStyle'); | ||
return { | ||
gridItemStyle, | ||
}; | ||
}, | ||
}; | ||
</script> | ||
|
||
|
||
<style lang="scss" scoped> | ||
.k-card-grid-item { | ||
&.with-checkbox { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
} | ||
} | ||
.checkbox { | ||
margin-right: 20px; | ||
} | ||
</style> |