Skip to content

Commit 0d0d4cc

Browse files
committed
feat: change style for session terminate button
1 parent e8f56fc commit 0d0d4cc

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

apps/client/src/components/qna/SessionSettingsDropdown.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import Button from '@/components/Button';
44

55
interface SessionSettingsDropdownProps {
66
buttons: Array<{
7-
icon: React.ReactNode;
8-
label: string;
7+
key: string;
8+
button: React.ReactNode;
99
onClick: () => void;
1010
}>;
1111
triggerRef?: React.RefObject<HTMLButtonElement>;
@@ -36,26 +36,23 @@ function SessionSettingsDropdown({
3636
return () => {
3737
document.removeEventListener('mousedown', handleClickOutside);
3838
};
39-
}, [onClose]);
39+
}, [onClose, triggerRef]);
4040

4141
return (
4242
<div
4343
ref={dropdownRef}
4444
className='absolute z-10 flex w-max flex-col gap-2 rounded-md bg-white p-4 shadow-lg ring-1 ring-black ring-opacity-5'
4545
>
46-
{buttons.map(({ icon, label, onClick }) => (
46+
{buttons.map(({ key, button, onClick }) => (
4747
<Button
4848
className='w-full rounded text-sm font-medium text-black transition-all duration-100 hover:bg-gray-100'
49-
key={label}
49+
key={key}
5050
onClick={() => {
5151
onClick();
5252
onClose();
5353
}}
5454
>
55-
<div className='flex w-full cursor-pointer flex-row items-center gap-2'>
56-
{icon}
57-
{label}
58-
</div>
55+
{button}
5956
</Button>
6057
))}
6158
</div>

0 commit comments

Comments
 (0)