Skip to content

Commit f516247

Browse files
committed
Make title prop mandatory
1 parent b192033 commit f516247

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

packages/ui-components/src/components/ai-chat-container/no-ai-enabled-popover.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,16 @@ const NoAiEnabledPopover = ({
1212
}: {
1313
className?: string;
1414
onCloseClick: () => void;
15-
title?: string;
15+
title: string;
1616
}) => {
17-
const displayTitle = title || t('OpenOps Assistant');
18-
1917
return (
2018
<div className={cn('bg-background shadow-editor rounded-lg', className)}>
2119
<div className="h-[58px] pl-4 pr-2 py-[10px] rounded-t-xl flex items-center justify-between bg-white dark:bg-black dark:text-white border-b">
2220
<div className="flex justify-center items-center gap-3">
2321
<div className="size-8 flex justify-center items-center bg-background bg-gradient-to-b from-ring/40 to-primary-200/40 rounded-xl">
2422
<Bot size={20} />
2523
</div>
26-
<h2 className="font-bold text-base">{displayTitle}</h2>
24+
<h2 className="font-bold text-base">{title}</h2>
2725
</div>
2826
<TooltipWrapper tooltipText={t('Close')}>
2927
<Button

packages/ui-components/src/stories/ai-chat/no-ai-enabled.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const meta = {
1212
},
1313
args: {
1414
onCloseClick: action('onCloseClick'),
15+
title: 'OpenOps Assistant',
1516
},
1617
tags: ['autodocs'],
1718
render: (args) => (

0 commit comments

Comments
 (0)