Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
J0ris-K committed Nov 12, 2024
1 parent 1f4b565 commit f0363cc
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@
<ComponentStory
v-slot="{ properties, settings }"
:params="[
prop('title').str(),
slot(),
slot('actions').help('Meant to receive actions item like buttons'),
slot('title').help('Meant to receive text item like title'),
slot('groupedBy').help('Meant to receive grouped item like breadcrumb'),
setting('defaultSlot').widget(text()).preset('message'),
setting('titleSlotContent').widget(text()).preset('Actions title'),
]"
>
<UiTableActions v-bind="properties">
{{ settings.defaultSlot }}
<template #actions>
<UiButton
v-for="(label, index) in buttonLabels"
:key="index"
:left-icon="label.icon"
level="tertiary"
color="normal"
size="medium"
>
{{ label.title }}
</UiButton>
<UiButton
v-for="(label, index) in buttonLabels"
:key="index"
:left-icon="label.icon"
variant="tertiary"
accent="info"
size="medium"
>
{{ label.title }}
</UiButton>
<template #title>
<UiActionsTitle>
{{ settings.titleSlotContent }}
</UiActionsTitle>
</template>
<template #groupedBy>
<span>Grouped By</span>
Expand All @@ -31,9 +34,10 @@

<script lang="ts" setup>
import ComponentStory from '@/components/component-story/ComponentStory.vue'
import { setting, slot } from '@/libs/story/story-param'
import { prop, setting, slot } from '@/libs/story/story-param'
import { text } from '@/libs/story/story-widget'
import UiButton from '@core/components/button/UiButton.vue'
import UiActionsTitle from '@core/components/ui/actions-title/UiActionsTitle.vue'
import UiButton from '@core/components/ui/button/UiButton.vue'
import UiTableActions from '@core/components/ui/table-actions/UiTableActions.vue'
import { faArrowsAlt, faCalendarDays, faCircleChevronRight } from '@fortawesome/free-solid-svg-icons'
import { ref } from 'vue'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
<template>
<div class="ui-table-actions">
<div class="actions">
<UiActionsTitle>
<slot />
</UiActionsTitle>
<slot name="actions" />
<slot name="title">
<UiActionsTitle>
{{ title }}
</UiActionsTitle>
</slot>
<slot />
</div>
<div v-if="slots.groupedBy">
<slot name="groupedBy" />
Expand All @@ -16,9 +18,13 @@
<script setup lang="ts">
import UiActionsTitle from '@core/components/ui/actions-title/UiActionsTitle.vue'
defineProps<{
title?: string
}>()
const slots = defineSlots<{
actions(): any
default(): any
title(): any
groupedBy?(): any
}>()
</script>
Expand Down

0 comments on commit f0363cc

Please sign in to comment.