@mackin.com/styleguide 8.5.2 → 8.6.2
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/index.d.ts +4 -1
- package/index.js +11 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -495,6 +495,7 @@ interface PagerOptions<TItem> {
|
|
|
495
495
|
limitOptions?: number[];
|
|
496
496
|
sort?: string;
|
|
497
497
|
sortOptions?: PagerSortOption<TItem>[];
|
|
498
|
+
/** Will copy over this pagers options, filters, and state. */
|
|
498
499
|
previous?: ItemPager<TItem>;
|
|
499
500
|
}
|
|
500
501
|
/** In-memory pager. */
|
|
@@ -862,7 +863,9 @@ interface SliderProps<T extends SliderValue> {
|
|
|
862
863
|
declare const Slider: <T extends SliderValue>(p: SliderProps<T>) => JSX.Element;
|
|
863
864
|
|
|
864
865
|
interface TabHeaderTabProps {
|
|
865
|
-
name: string;
|
|
866
|
+
name: string | JSX.Element;
|
|
867
|
+
/** The HTML title of the tab button. Defaults to 'name' prop. */
|
|
868
|
+
title?: string;
|
|
866
869
|
}
|
|
867
870
|
interface TabHeaderProps {
|
|
868
871
|
tabs: TabHeaderTabProps[];
|
package/index.js
CHANGED
|
@@ -3955,8 +3955,17 @@ const TabHeader = (p) => {
|
|
|
3955
3955
|
overflow: 'hidden',
|
|
3956
3956
|
});
|
|
3957
3957
|
}
|
|
3958
|
+
let title = tab.title;
|
|
3959
|
+
let buttonContent;
|
|
3960
|
+
if (typeof tab.name === 'string') {
|
|
3961
|
+
title !== null && title !== void 0 ? title : (title = tab.name);
|
|
3962
|
+
buttonContent = React__namespace.createElement(Text, { tag: "div", align: "center", ellipsis: true }, tab.name);
|
|
3963
|
+
}
|
|
3964
|
+
else {
|
|
3965
|
+
buttonContent = tab.name;
|
|
3966
|
+
}
|
|
3958
3967
|
return (React__namespace.createElement("li", { key: index, className: css.cx(tabStyles, p.tabClassName) },
|
|
3959
|
-
React__namespace.createElement(Button, { disabled: tabsChanging, className: buttonStyles, variant: buttonVariant, title:
|
|
3968
|
+
React__namespace.createElement(Button, { disabled: tabsChanging, className: buttonStyles, variant: buttonVariant, title: title, readOnly: active, onClick: () => {
|
|
3960
3969
|
const onChange = () => {
|
|
3961
3970
|
var _a;
|
|
3962
3971
|
setTabIndex(index);
|
|
@@ -3978,7 +3987,7 @@ const TabHeader = (p) => {
|
|
|
3978
3987
|
else {
|
|
3979
3988
|
onChange();
|
|
3980
3989
|
}
|
|
3981
|
-
} },
|
|
3990
|
+
} }, buttonContent)));
|
|
3982
3991
|
})),
|
|
3983
3992
|
variant === 'tab' && (React__namespace.createElement("div", { className: css.cx(css.css({
|
|
3984
3993
|
label: 'TabHeaderDivider',
|