@ceed/ads 1.41.3-next.3 → 1.41.3-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/IconMenuButton/IconMenuButton.d.ts +3 -3
- package/dist/components/navigation/IconMenuButton.md +12 -12
- package/dist/index.browser.js +2 -2
- package/dist/index.browser.js.map +3 -3
- package/dist/index.cjs +16 -12
- package/dist/index.js +16 -12
- package/framer/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { AriaAttributes, ComponentProps, ComponentRef, ElementType, ReactNode } from 'react';
|
|
2
|
-
import { MenuButtonProps as JoyMenuButtonProps } from '@mui/joy';
|
|
2
|
+
import { MenuButtonProps as JoyMenuButtonProps, IconButtonProps as JoyIconButtonProps, MenuItemProps as JoyMenuItemProps } from '@mui/joy';
|
|
3
3
|
export interface IconMenuButtonProps<T extends ElementType = 'button', P extends ElementType = 'li'> {
|
|
4
4
|
size?: JoyMenuButtonProps<T, P>['size'];
|
|
5
5
|
icon: ReactNode;
|
|
6
6
|
buttonComponent?: T;
|
|
7
|
-
buttonComponentProps?: ComponentProps<T> & AriaAttributes
|
|
7
|
+
buttonComponentProps?: ComponentProps<T> & AriaAttributes & Pick<JoyIconButtonProps, 'sx'>;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
loading?: boolean;
|
|
10
10
|
color?: JoyMenuButtonProps<T, P>['color'];
|
|
@@ -12,7 +12,7 @@ export interface IconMenuButtonProps<T extends ElementType = 'button', P extends
|
|
|
12
12
|
items?: {
|
|
13
13
|
text: string;
|
|
14
14
|
component?: P;
|
|
15
|
-
componentProps?: ComponentProps<P>;
|
|
15
|
+
componentProps?: ComponentProps<P> & Pick<JoyMenuItemProps, 'disabled'>;
|
|
16
16
|
}[];
|
|
17
17
|
placement?: 'bottom-start' | 'bottom' | 'bottom-end';
|
|
18
18
|
}
|
|
@@ -229,18 +229,18 @@ function EditorToolbar({ onAction }) {
|
|
|
229
229
|
|
|
230
230
|
### Key Props
|
|
231
231
|
|
|
232
|
-
| Prop | Type | Default | Description
|
|
233
|
-
| ---------------------- | ---------------------------------------------------------------------- | ----------- |
|
|
234
|
-
| `icon` | `ReactNode` | (required) | Icon element to render in the trigger button
|
|
235
|
-
| `items` | `{ text: string; component?: ElementType; componentProps?: object }[]` | - | Menu items
|
|
236
|
-
| `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | Button size
|
|
237
|
-
| `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Button color
|
|
238
|
-
| `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'plain'` | Button visual style
|
|
239
|
-
| `disabled` | `boolean` | `false` | Disables the button
|
|
240
|
-
| `loading` | `boolean` | `false` | Shows loading indicator
|
|
241
|
-
| `placement` | `Placement` | `'bottom'` | Menu position
|
|
242
|
-
| `buttonComponent` | `ElementType` | - | Custom trigger element
|
|
243
|
-
| `buttonComponentProps` | `object` | - | Props passed to
|
|
232
|
+
| Prop | Type | Default | Description |
|
|
233
|
+
| ---------------------- | ---------------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ |
|
|
234
|
+
| `icon` | `ReactNode` | (required) | Icon element to render in the trigger button |
|
|
235
|
+
| `items` | `{ text: string; component?: ElementType; componentProps?: object }[]` | - | Menu items. `componentProps` reaches Joy `MenuItem`, so `disabled` works |
|
|
236
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | Button size |
|
|
237
|
+
| `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Button color |
|
|
238
|
+
| `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'plain'` | Button visual style |
|
|
239
|
+
| `disabled` | `boolean` | `false` | Disables the button |
|
|
240
|
+
| `loading` | `boolean` | `false` | Shows loading indicator |
|
|
241
|
+
| `placement` | `Placement` | `'bottom'` | Menu position |
|
|
242
|
+
| `buttonComponent` | `ElementType` | - | Custom trigger element |
|
|
243
|
+
| `buttonComponentProps` | `object` | - | Props passed to the trigger. Reaches Joy `IconButton`, so `sx` works |
|
|
244
244
|
|
|
245
245
|
## Best Practices
|
|
246
246
|
|