updates on the ai bot
This commit is contained in:
@@ -6,9 +6,9 @@ import { LuChevronDown } from 'react-icons/lu';
|
|||||||
import { HStack } from '@astryxdesign/core/HStack';
|
import { HStack } from '@astryxdesign/core/HStack';
|
||||||
import { VStack } from '@astryxdesign/core/VStack';
|
import { VStack } from '@astryxdesign/core/VStack';
|
||||||
import { Text } from '@astryxdesign/core/Text';
|
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 { 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 { Spark, Metric, StatGrid, StateBlock, AnswerList } from './AIParts';
|
||||||
import AIFlowStep from './AIFlowStep';
|
import AIFlowStep from './AIFlowStep';
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import { LuChevronDown, LuPanelRightOpen, LuPanelRightClose, LuHistory, LuTrash2
|
|||||||
import { HStack } from '@astryxdesign/core/HStack';
|
import { HStack } from '@astryxdesign/core/HStack';
|
||||||
import { VStack } from '@astryxdesign/core/VStack';
|
import { VStack } from '@astryxdesign/core/VStack';
|
||||||
import { Text } from '@astryxdesign/core/Text';
|
import { Text } from '@astryxdesign/core/Text';
|
||||||
import { IconButton } from '@astryxdesign/core/IconButton';
|
|
||||||
import { DropdownMenu } from '@astryxdesign/core/DropdownMenu';
|
import { DropdownMenu } from '@astryxdesign/core/DropdownMenu';
|
||||||
|
import { IconButton } from '@/components/ds';
|
||||||
|
|
||||||
import { OpenToast } from 'components/third-party/OpenToast';
|
import { OpenToast } from 'components/third-party/OpenToast';
|
||||||
import { STATUS } from 'themes/dt/tokens';
|
import { STATUS } from 'themes/dt/tokens';
|
||||||
|
|||||||
@@ -19,9 +19,16 @@ export const IconButton = React.forwardRef(
|
|||||||
lg: 'icon-lg',
|
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 = (
|
const button = (
|
||||||
<Button ref={ref} size={sizeMap[size] || 'icon'} aria-label={label} {...props}>
|
<Button ref={ref} size={sizeMap[size] || 'icon'} aria-label={label} {...props}>
|
||||||
<Icon aria-hidden="true" />
|
{renderIcon()}
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user