Skip to content

Commit

Permalink
Add lab examples
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed May 12, 2024
1 parent 72ab44f commit 0aa99be
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
15 changes: 15 additions & 0 deletions panel/lab/components/item/1_list/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,20 @@
theme="disabled"
/>
</k-lab-example>
<k-lab-example label="Wrap for long title/info">
<k-item
:buttons="[
{
icon: 'edit'
},
{
icon: 'trash'
}
]"
:image="{ src: 'https://picsum.photos/800/600' }"
info="With some more information than usual"
text="This is a nice item with a rather long title that should wrap"
/>
</k-lab-example>
</k-lab-examples>
</template>
16 changes: 16 additions & 0 deletions panel/lab/components/item/2_cards/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,21 @@
theme="disabled"
/>
</k-lab-example>
<k-lab-example label="Wrap for long title/info">
<k-item
:buttons="[
{
icon: 'edit'
},
{
icon: 'trash'
}
]"
:image="{ src: 'https://picsum.photos/800/600' }"
info="With some more information than usual"
layout="cards"
text="This is a nice item with a rather long title that should wrap"
/>
</k-lab-example>
</k-lab-examples>
</template>
16 changes: 16 additions & 0 deletions panel/lab/components/item/3_cardlets/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,21 @@
theme="disabled"
/>
</k-lab-example>
<k-lab-example label="Wrap for long title/info">
<k-item
:buttons="[
{
icon: 'edit'
},
{
icon: 'trash'
}
]"
:image="{ src: 'https://picsum.photos/800/600' }"
info="With some more information than usual"
layout="cardlets"
text="This is a nice item with a rather long title that should wrap"
/>
</k-lab-example>
</k-lab-examples>
</template>
1 change: 1 addition & 0 deletions panel/src/components/Collection/Item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
</div>

<div
v-if="buttons?.length || options || $slots.options"
class="k-item-options"
:data-only-option="!buttons?.length || (!options && !$slots.options)"
>
Expand Down

0 comments on commit 0aa99be

Please sign in to comment.