mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-20 21:15:01 +00:00
# Pull Request Template ## Description This PR introduces a new changelog component that can be used in the sidebar. Fixes https://linear.app/chatwoot/issue/CW-5776/changelog-card-ui-component ## Type of change - [x] New feature (non-breaking change which adds functionality) ## How Has This Been Tested? ### Screencast https://github.com/user-attachments/assets/42e77e82-388a-4fc9-9b37-f3d0ea1a9d7f ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --------- Co-authored-by: Muhsin <muhsinkeramam@gmail.com>
47 lines
1.2 KiB
Vue
47 lines
1.2 KiB
Vue
<script setup>
|
|
import StackedChangelogCard from './StackedChangelogCard.vue';
|
|
|
|
const imageCards = {
|
|
id: 'chatwoot-captain',
|
|
title: 'Chatwoot Captain',
|
|
meta_title: 'Chatwoot Captain',
|
|
meta_description:
|
|
'Watch how our latest feature can transform your workflow with powerful automation tools.',
|
|
slug: 'chatwoot-captain',
|
|
feature_image:
|
|
'https://www.chatwoot.com/images/captain/captain_thumbnail.jpg',
|
|
};
|
|
|
|
const handleReadMore = () => {
|
|
console.log(`Read more: ${imageCards.title}`);
|
|
};
|
|
|
|
const handleDismiss = () => {
|
|
console.log(`Dismissed: ${imageCards.title}`);
|
|
};
|
|
|
|
const handleImgClick = () => {
|
|
console.log(`Card clicked: ${imageCards.title}`);
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<Story
|
|
title="Components/ChangelogCard/StackedChangelogCard"
|
|
:layout="{ type: 'grid', width: '260px' }"
|
|
>
|
|
<Variant title="Single Card - With Image">
|
|
<div class="p-3 bg-n-solid-2 w-56">
|
|
<StackedChangelogCard
|
|
:card="imageCards"
|
|
is-active
|
|
:is-dismissing="false"
|
|
@read-more="handleReadMore(imageCards)"
|
|
@dismiss="handleDismiss(imageCards)"
|
|
@img-click="handleImgClick(imageCards)"
|
|
/>
|
|
</div>
|
|
</Variant>
|
|
</Story>
|
|
</template>
|