updates on the ai bot

This commit is contained in:
2026-08-27 17:17:07 +05:30
parent 1d1e51620e
commit 475a8e4c04
3 changed files with 11 additions and 4 deletions

View File

@@ -6,9 +6,9 @@ import { LuChevronDown } from 'react-icons/lu';
import { HStack } from '@astryxdesign/core/HStack';
import { VStack } from '@astryxdesign/core/VStack';
import { Text } from '@astryxdesign/core/Text';
import { IconButton } from '@astryxdesign/core/IconButton';
import { Button } from '@/components/ui/button';
import { ChatToolCalls } from '@astryxdesign/core/Chat';
import { Button } from '@/components/ui/button';
import { IconButton } from '@/components/ds';
import { Spark, Metric, StatGrid, StateBlock, AnswerList } from './AIParts';
import AIFlowStep from './AIFlowStep';

View File

@@ -10,8 +10,8 @@ import { LuChevronDown, LuPanelRightOpen, LuPanelRightClose, LuHistory, LuTrash2
import { HStack } from '@astryxdesign/core/HStack';
import { VStack } from '@astryxdesign/core/VStack';
import { Text } from '@astryxdesign/core/Text';
import { IconButton } from '@astryxdesign/core/IconButton';
import { DropdownMenu } from '@astryxdesign/core/DropdownMenu';
import { IconButton } from '@/components/ds';
import { OpenToast } from 'components/third-party/OpenToast';
import { STATUS } from 'themes/dt/tokens';

View File

@@ -19,9 +19,16 @@ export const IconButton = React.forwardRef(
lg: 'icon-lg',
};
const renderIcon = () => {
if (!Icon) return null;
if (React.isValidElement(Icon)) return Icon;
const Comp = Icon;
return <Comp aria-hidden="true" />;
};
const button = (
<Button ref={ref} size={sizeMap[size] || 'icon'} aria-label={label} {...props}>
<Icon aria-hidden="true" />
{renderIcon()}
</Button>
);