diff --git a/app/javascript/dashboard/components-next/Conversation/SidepanelSwitch.vue b/app/javascript/dashboard/components-next/Conversation/SidepanelSwitch.vue index 1ee969275..5e96df3c6 100644 --- a/app/javascript/dashboard/components-next/Conversation/SidepanelSwitch.vue +++ b/app/javascript/dashboard/components-next/Conversation/SidepanelSwitch.vue @@ -1,5 +1,6 @@ diff --git a/app/javascript/dashboard/components-next/HelpCenter/Pages/ArticleEditorPage/ArticleEditorHeader.vue b/app/javascript/dashboard/components-next/HelpCenter/Pages/ArticleEditorPage/ArticleEditorHeader.vue index 2d8b219f7..bec54593f 100644 --- a/app/javascript/dashboard/components-next/HelpCenter/Pages/ArticleEditorPage/ArticleEditorHeader.vue +++ b/app/javascript/dashboard/components-next/HelpCenter/Pages/ArticleEditorPage/ArticleEditorHeader.vue @@ -14,6 +14,7 @@ import { } from 'dashboard/helper/portalHelper'; import wootConstants from 'dashboard/constants/globals'; +import ButtonGroup from 'dashboard/components-next/buttonGroup/ButtonGroup.vue'; import Button from 'dashboard/components-next/button/Button.vue'; import DropdownMenu from 'dashboard/components-next/dropdown-menu/DropdownMenu.vue'; @@ -140,11 +141,12 @@ const updateArticleStatus = async ({ value }) => { :disabled="!articleId" @click="previewArticle" /> -
+
- + diff --git a/app/javascript/dashboard/components-next/button/Button.vue b/app/javascript/dashboard/components-next/button/Button.vue index dde1d3d9a..1dfe488e9 100644 --- a/app/javascript/dashboard/components-next/button/Button.vue +++ b/app/javascript/dashboard/components-next/button/Button.vue @@ -36,6 +36,7 @@ const props = defineProps({ icon: { type: [String, Object, Function], default: '' }, trailingIcon: { type: Boolean, default: false }, isLoading: { type: Boolean, default: false }, + noAnimation: { type: Boolean, default: false }, }); const slots = useSlots(); @@ -179,12 +180,18 @@ const STYLE_CONFIG = { md: 'text-sm font-medium', lg: 'text-base', }, + clickAnimation: { + xs: 'active:enabled:scale-[0.97]', + sm: 'active:enabled:scale-[0.97]', + md: 'active:enabled:scale-[0.98]', + lg: 'active:enabled:scale-[0.98]', + }, justify: { start: 'justify-start', center: 'justify-center', end: 'justify-end', }, - base: 'inline-flex items-center min-w-0 gap-2 transition-all duration-200 ease-in-out border-0 rounded-lg outline-1 outline disabled:opacity-50', + base: 'inline-flex items-center min-w-0 gap-2 transition-all duration-100 ease-out border-0 rounded-lg outline-1 outline disabled:opacity-50', }; const variantClasses = computed(() => { @@ -221,6 +228,12 @@ const linkButtonClasses = computed(() => { return classes.join(' '); }); + +const animationClasses = computed(() => { + return props.noAnimation + ? '' + : STYLE_CONFIG.clickAnimation[computedSize.value]; +});