Skip to content

Commit

Permalink
fix: improve timings and speed up
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaalnaik committed Nov 26, 2024
1 parent b054b63 commit 533cedb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions packages/chat/src/components/NewChat/NewChat.css.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { globalStyle, style } from '@vanilla-extract/css';
import { recipe } from '@vanilla-extract/recipes';

import { duration } from '@/styles/animations';
import { COLORS } from '@/styles/colors';
import { transition } from '@/styles/transitions';
import { widgetContainer } from '@/views/ChatWidget/styles.css';
Expand Down Expand Up @@ -70,12 +71,12 @@ export const chatContentWrapper = style({
opacity: 0,
selectors: {
[`.${widgetContainer.classNames.variants.withChat.true} &`]: {
animation: `${fadeIn} .3s ease-in forwards`,
animationDelay: '.6s;',
animation: `${fadeIn} ${duration.fast} ease-in forwards`,
animationDelay: '.6s',
pointerEvents: 'auto',
},
[`.${widgetContainer.classNames.variants.withChat.false} &`]: {
animation: `${fadeOut} .3s ease-out`,
animation: `${fadeOut} ${duration.fast} ease-out`,
pointerEvents: 'none',
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { keyframes, style } from '@vanilla-extract/css';

import { duration } from '@/styles/animations';
import { COLORS } from '@/styles/colors';
import { FAMILY } from '@/styles/font';
import { widgetContainer } from '@/views/ChatWidget/styles.css';
Expand Down Expand Up @@ -36,11 +37,11 @@ export const welcomeMessageContainer = style({
opacity: 0,
selectors: {
[`.${widgetContainer.classNames.variants.withChat.true} &`]: {
animation: `${fadeIn} 300ms ease-in forwards`,
animationDelay: '300ms',
animation: `${fadeIn} ${duration.fast} ease-in forwards`,
animationDelay: duration.slow,
},
[`.${widgetContainer.classNames.variants.withChat.false} &`]: {
animation: `${fadeOut} 300ms ease-out forwards`,
animation: `${fadeOut} ${duration.fast} ease-out forwards`,
},
},
});
Expand Down

0 comments on commit 533cedb

Please sign in to comment.