Skip to content

Commit

Permalink
feat(redmine 1273832): update items and ButtonsListOrDropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
vapersmile committed Jan 19, 2024
1 parent d9293e2 commit e561858
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions packages/react-front-kit-shared/src/types/items.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IOption } from '../../dist';
import type { ReactNode } from 'react';

export interface IItem<T> {
label: ReactNode;
value: T;
export interface IItem<T> extends IOption<T> {
content?: ReactNode;
}

export type IItems<T> = IItems<T>[];
export type IItems<T> = IItem<T>[];
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';
import type { ButtonProps, MenuProps } from '@mantine/core';
import type { ReactElement, ReactNode } from 'react';
import type { IItems } from '@smile/react-front-kit-shared';
import type { ReactElement } from 'react';

import { Button, Menu, createStyles } from '@mantine/core';
import { useUncontrolled } from '@mantine/hooks';
Expand All @@ -16,7 +17,7 @@ export interface IButtonsListOrDropdownProps extends MenuProps {
buttonProps?: ButtonProps;
current?: string;
defaultCurrent: string;
items: { label: ReactNode; value: string }[];
items: IItems<string>;
menuIfValueGreaterThan?: number;
onAction?: () => void;
}
Expand Down

0 comments on commit e561858

Please sign in to comment.