@primer/components 0.0.0-20219266052 → 0.0.0-2021926645
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 +14 -4
- package/dist/browser.esm.js +21 -21
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +1 -1
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList/Item.d.ts +6 -0
- package/lib/ActionList/Item.js +5 -1
- package/lib-esm/ActionList/Item.d.ts +6 -0
- package/lib-esm/ActionList/Item.js +5 -1
- package/package.json +1 -1
package/lib/ActionList/Item.d.ts
CHANGED
@@ -28,13 +28,19 @@ export interface ItemProps extends SxProp {
|
|
28
28
|
*/
|
29
29
|
leadingVisual?: React.FunctionComponent<IconProps>;
|
30
30
|
/**
|
31
|
+
* @deprecated Use `trailingVisual` instead
|
31
32
|
* Icon (or similar) positioned after `Item` text.
|
32
33
|
*/
|
33
34
|
trailingIcon?: React.FunctionComponent<IconProps>;
|
34
35
|
/**
|
36
|
+
* @deprecated Use `trailingVisual` instead
|
35
37
|
* Text positioned after `Item` text and optional trailing icon.
|
36
38
|
*/
|
37
39
|
trailingText?: string;
|
40
|
+
/**
|
41
|
+
* Icon or text positioned after `Item` text.
|
42
|
+
*/
|
43
|
+
trailingVisual?: React.ReactNode;
|
38
44
|
/**
|
39
45
|
* Style variations associated with various `Item` types.
|
40
46
|
*
|
package/lib/ActionList/Item.js
CHANGED
@@ -187,6 +187,7 @@ const Item = /*#__PURE__*/_react.default.forwardRef((itemProps, ref) => {
|
|
187
187
|
selectionVariant,
|
188
188
|
leadingVisual: LeadingVisual,
|
189
189
|
trailingIcon: TrailingIcon,
|
190
|
+
trailingVisual: TrailingVisual,
|
190
191
|
trailingText,
|
191
192
|
variant = 'default',
|
192
193
|
showDivider,
|
@@ -278,7 +279,10 @@ const Item = /*#__PURE__*/_react.default.forwardRef((itemProps, ref) => {
|
|
278
279
|
title: description,
|
279
280
|
inline: true,
|
280
281
|
maxWidth: "100%"
|
281
|
-
}, description)) : null),
|
282
|
+
}, description)) : null), TrailingVisual ? /*#__PURE__*/_react.default.createElement(TrailingContent, {
|
283
|
+
variant: variant,
|
284
|
+
disabled: disabled
|
285
|
+
}, typeof TrailingVisual === 'function' ? /*#__PURE__*/_react.default.createElement(TrailingVisual, null) : TrailingVisual) : TrailingIcon || trailingText ? /*#__PURE__*/_react.default.createElement(TrailingContent, {
|
282
286
|
variant: variant,
|
283
287
|
disabled: disabled
|
284
288
|
}, trailingText, TrailingIcon && /*#__PURE__*/_react.default.createElement(TrailingIcon, null)) : null));
|
@@ -28,13 +28,19 @@ export interface ItemProps extends SxProp {
|
|
28
28
|
*/
|
29
29
|
leadingVisual?: React.FunctionComponent<IconProps>;
|
30
30
|
/**
|
31
|
+
* @deprecated Use `trailingVisual` instead
|
31
32
|
* Icon (or similar) positioned after `Item` text.
|
32
33
|
*/
|
33
34
|
trailingIcon?: React.FunctionComponent<IconProps>;
|
34
35
|
/**
|
36
|
+
* @deprecated Use `trailingVisual` instead
|
35
37
|
* Text positioned after `Item` text and optional trailing icon.
|
36
38
|
*/
|
37
39
|
trailingText?: string;
|
40
|
+
/**
|
41
|
+
* Icon or text positioned after `Item` text.
|
42
|
+
*/
|
43
|
+
trailingVisual?: React.ReactNode;
|
38
44
|
/**
|
39
45
|
* Style variations associated with various `Item` types.
|
40
46
|
*
|
@@ -154,6 +154,7 @@ export const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
154
154
|
selectionVariant,
|
155
155
|
leadingVisual: LeadingVisual,
|
156
156
|
trailingIcon: TrailingIcon,
|
157
|
+
trailingVisual: TrailingVisual,
|
157
158
|
trailingText,
|
158
159
|
variant = 'default',
|
159
160
|
showDivider,
|
@@ -245,7 +246,10 @@ export const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
245
246
|
title: description,
|
246
247
|
inline: true,
|
247
248
|
maxWidth: "100%"
|
248
|
-
}, description)) : null),
|
249
|
+
}, description)) : null), TrailingVisual ? /*#__PURE__*/React.createElement(TrailingContent, {
|
250
|
+
variant: variant,
|
251
|
+
disabled: disabled
|
252
|
+
}, typeof TrailingVisual === 'function' ? /*#__PURE__*/React.createElement(TrailingVisual, null) : TrailingVisual) : TrailingIcon || trailingText ? /*#__PURE__*/React.createElement(TrailingContent, {
|
249
253
|
variant: variant,
|
250
254
|
disabled: disabled
|
251
255
|
}, trailingText, TrailingIcon && /*#__PURE__*/React.createElement(TrailingIcon, null)) : null));
|