@atlaskit/menu 1.3.4 → 1.3.5
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/CHANGELOG.md +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/types.d.ts +33 -31
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
package/dist/types/types.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ export interface SectionProps {
|
|
|
94
94
|
overrides?: {
|
|
95
95
|
HeadingItem?: {
|
|
96
96
|
/**
|
|
97
|
-
* A function that
|
|
97
|
+
* A function that overrides the styles of the component.
|
|
98
98
|
* It receives the current styles and state and expects a styles object.
|
|
99
99
|
*/
|
|
100
100
|
cssFn?: StatelessCSSFn;
|
|
@@ -127,10 +127,10 @@ export interface MenuItemPrimitiveProps {
|
|
|
127
127
|
}
|
|
128
128
|
export interface MenuItemProps {
|
|
129
129
|
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
A function that overrides the styles of the component.
|
|
131
|
+
It receives the current styles and state and expects a styles object.
|
|
132
|
+
|
|
133
|
+
@deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
134
134
|
*/
|
|
135
135
|
cssFn?: CSSFn;
|
|
136
136
|
/**
|
|
@@ -175,9 +175,9 @@ export interface MenuItemProps {
|
|
|
175
175
|
*/
|
|
176
176
|
testId?: string;
|
|
177
177
|
/**
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
Custom overrides for the composed components.
|
|
179
|
+
|
|
180
|
+
@deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
181
181
|
*/
|
|
182
182
|
overrides?: Overrides;
|
|
183
183
|
/**
|
|
@@ -266,14 +266,16 @@ export interface CustomItemComponentProps {
|
|
|
266
266
|
}
|
|
267
267
|
export interface CustomItemProps<TCustomComponentProps = CustomItemComponentProps> extends MenuItemProps {
|
|
268
268
|
/**
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
269
|
+
Custom component to render as an item. This can be both a functional component or a class component.
|
|
270
|
+
|
|
271
|
+
__Will return `null` if no component is defined.__
|
|
272
|
+
|
|
273
|
+
Props passed to `CustomItem` will be passed down to this component. If the props for `component` have TypeScript types,
|
|
274
|
+
CustomItem will extend them, providing type safety for your custom item.
|
|
275
|
+
|
|
276
|
+
e.g. `<CustomItem to="/link" component={RouterLink} />`
|
|
277
|
+
|
|
278
|
+
__NOTE:__ Make sure the reference for this component does not change between renders else undefined behavior may happen.
|
|
277
279
|
*/
|
|
278
280
|
component?: React.ComponentType<TCustomComponentProps>;
|
|
279
281
|
}
|
|
@@ -305,17 +307,17 @@ export interface SkeletonItemProps {
|
|
|
305
307
|
*/
|
|
306
308
|
isShimmering?: boolean;
|
|
307
309
|
/**
|
|
308
|
-
* A function that
|
|
310
|
+
* A function that overrides the styles of this component.
|
|
309
311
|
* It receives the current styles and returns a customized styles object.
|
|
310
312
|
*/
|
|
311
313
|
cssFn?: StatelessCSSFn;
|
|
312
314
|
}
|
|
313
315
|
export interface HeadingItemProps {
|
|
314
316
|
/**
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
A function that overrides the styles.
|
|
318
|
+
It receives the current styles and returns a customized styles object.
|
|
319
|
+
|
|
320
|
+
@deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
319
321
|
*/
|
|
320
322
|
cssFn?: StatelessCSSFn;
|
|
321
323
|
/**
|
|
@@ -353,10 +355,10 @@ export interface SkeletonHeadingItemProps {
|
|
|
353
355
|
*/
|
|
354
356
|
isShimmering?: boolean;
|
|
355
357
|
/**
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
358
|
+
A function that overrides the styles of this component.
|
|
359
|
+
It receives the current styles and returns a customized styles object.
|
|
360
|
+
|
|
361
|
+
@deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
360
362
|
*/
|
|
361
363
|
cssFn?: StatelessCSSFn;
|
|
362
364
|
}
|
|
@@ -365,12 +367,12 @@ export declare type ItemState = {
|
|
|
365
367
|
isDisabled: boolean;
|
|
366
368
|
};
|
|
367
369
|
/**
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
370
|
+
A function that overrides the styles of
|
|
371
|
+
menu components. It receives the current state
|
|
372
|
+
and should return a CSSObject.
|
|
373
|
+
|
|
374
|
+
@see @atlaskit/menu/docs/85-overriding-item-styles
|
|
375
|
+
@deprecated This type is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
374
376
|
*/
|
|
375
377
|
export interface CSSFn<TState = ItemState extends void ? void : ItemState> {
|
|
376
378
|
(currentState: TState): CSSObject | CSSObject[];
|