From b8b3676c57ef72ddce0846fe9115ad0ad9d7908f Mon Sep 17 00:00:00 2001 From: jmfrancois Date: Fri, 13 Oct 2023 09:00:28 +0200 Subject: [PATCH] fix: re-add checked props on dropdown --- .../Dropdown/Primitive/DropdownButton.tsx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/design-system/src/components/Dropdown/Primitive/DropdownButton.tsx b/packages/design-system/src/components/Dropdown/Primitive/DropdownButton.tsx index 06edb336bd..c94406c24b 100644 --- a/packages/design-system/src/components/Dropdown/Primitive/DropdownButton.tsx +++ b/packages/design-system/src/components/Dropdown/Primitive/DropdownButton.tsx @@ -5,18 +5,23 @@ import { IconNameWithSize } from '@talend/icons/dist/typeUtils'; import { DeprecatedIconNames } from '../../../types'; import Clickable, { ClickableProps } from '../../Clickable'; +import { SizedIcon } from '../../Icon'; import { getIconWithDeprecatedSupport } from '../../Icon/DeprecatedIconHelper'; import styles from './DropdownEntry.module.scss'; -export type DropdownButtonType = ClickableProps & /*MenuItemProps &*/ { +/** + * This is in fact a Menu Item + */ + +export type DropdownButtonType = ClickableProps & { icon?: DeprecatedIconNames | IconNameWithSize<'M'>; }; export const DropdownButton = forwardRef( - ({ children, icon, ...props }: DropdownButtonType, ref: Ref) => { + ({ children, icon, checked, ...props }: DropdownButtonType, ref: Ref) => { return ( - +
{icon && ( @@ -28,6 +33,14 @@ export const DropdownButton = forwardRef( )} {children} + {checked && ( + + )}
);