From 9f1b2fba0473adf685a4c8a416b8083f4468fbd3 Mon Sep 17 00:00:00 2001 From: David Newell Date: Tue, 16 Apr 2024 18:24:32 +0100 Subject: [PATCH] chore: cleanup More button component --- .../src/lib/lemon-ui/LemonButton/More.tsx | 19 +++--------- .../scenes/settings/user/PersonalAPIKeys.tsx | 29 ------------------- 2 files changed, 4 insertions(+), 44 deletions(-) diff --git a/frontend/src/lib/lemon-ui/LemonButton/More.tsx b/frontend/src/lib/lemon-ui/LemonButton/More.tsx index f570588bb93b3..65983366eae8b 100644 --- a/frontend/src/lib/lemon-ui/LemonButton/More.tsx +++ b/frontend/src/lib/lemon-ui/LemonButton/More.tsx @@ -2,35 +2,24 @@ import { IconEllipsis } from '@posthog/icons' import { PopoverProps } from '../Popover/Popover' import { LemonButtonWithDropdown } from '.' -import { LemonButtonProps, LemonButtonWithDropdownProps } from './LemonButton' +import { LemonButtonProps } from './LemonButton' -export type MoreProps = Partial> & - LemonButtonProps & { - 'data-attr'?: string - onClick?: LemonButtonWithDropdownProps['onClick'] - } +export type MoreProps = Partial> & LemonButtonProps -export function More({ - overlay, - placement = 'bottom-end', - 'data-attr': dataAttr, - onClick, - ...buttonProps -}: MoreProps): JSX.Element { +export function More({ overlay, 'data-attr': dataAttr, ...buttonProps }: MoreProps): JSX.Element { return ( } dropdown={{ - placement, + placement: 'bottom-end', actionable: true, overlay, }} size="small" {...buttonProps} disabled={!overlay} - onClick={onClick} /> ) } diff --git a/frontend/src/scenes/settings/user/PersonalAPIKeys.tsx b/frontend/src/scenes/settings/user/PersonalAPIKeys.tsx index af63bd46dd23b..eaceddb91f3fc 100644 --- a/frontend/src/scenes/settings/user/PersonalAPIKeys.tsx +++ b/frontend/src/scenes/settings/user/PersonalAPIKeys.tsx @@ -409,35 +409,6 @@ function PersonalAPIKeysTable(): JSX.Element { > } /> - // - // View - // Edit - // - // { - // LemonDialog.open({ - // title: `Permanently delete key "${key.label}"?`, - // description: - // 'This action cannot be undone. Make sure to have removed the key from any live integrations first.', - // primaryButton: { - // status: 'danger', - // children: 'Permanently delete', - // onClick: () => deleteKey(key.id), - // }, - // }) - // }} - // > - // Delete - // - // - // } - // /> ) }, },