Skip to content
This repository has been archived by the owner on Feb 5, 2025. It is now read-only.

Commit

Permalink
fix: launcher spacing to chat (COR-4256)
Browse files Browse the repository at this point in the history
  • Loading branch information
gillyb committed Dec 18, 2024
1 parent 89e2607 commit f19b64b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/chat/src/components/Launcher/styles.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { buttonStyles } from '../Button/styles.css';
import { fadeInSlideUp } from '../UserResponse/styles.css';

export const LAUNCHER_SIZE = 48;
export const LAUNCHER_WIDTH_LABEL_SIZE = 40;
export const LAUNCHER_WITH_LABEL_SIZE = 40;

export const launcherContainer = style({
width: 'fit-content',
Expand Down
4 changes: 2 additions & 2 deletions packages/chat/src/views/ChatWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import clsx from 'clsx';
import { useContext, useEffect, useLayoutEffect, useState } from 'react';

import { Launcher } from '@/components/Launcher';
import { LAUNCHER_SIZE, LAUNCHER_WIDTH_LABEL_SIZE } from '@/components/Launcher/styles.css';
import { LAUNCHER_SIZE, LAUNCHER_WITH_LABEL_SIZE } from '@/components/Launcher/styles.css';
import { Proactive } from '@/components/Proactive';
import { ClassName } from '@/constants';
import { RuntimeStateAPIContext, RuntimeStateContext } from '@/contexts';
Expand Down Expand Up @@ -67,7 +67,7 @@ export const ChatWidget: React.FC<ChatWidgetProps> = ({ shadowRoot, chatAPI, rea

const side = assistant.common.position;
const position = { bottom: `${assistant.common.bottomSpacing}px`, [side]: `${assistant.common.sideSpacing}px` };
const launcherButtonSize = assistant.common.launcher.type === 'label' ? LAUNCHER_WIDTH_LABEL_SIZE : LAUNCHER_SIZE;
const launcherButtonSize = assistant.common.launcher.type === 'icon' ? LAUNCHER_SIZE : LAUNCHER_WITH_LABEL_SIZE;
const chatHeight = `calc(100% - ${launcherButtonSize + LAUNCHER_MARGIN + parseInt(assistant.common.bottomSpacing, 10) + 20}px)`;

const widgetPosition = {
Expand Down

0 comments on commit f19b64b

Please sign in to comment.