@aurora-ds/components 0.17.12 → 0.17.14
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/cjs/components/navigation/tabs/tab-item/TabItem.props.d.ts +6 -1
- package/dist/cjs/index.js +3 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/navigation/tabs/tab-item/TabItem.props.d.ts +6 -1
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/package.json +1 -1
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
1
2
|
export type TabItemProps = {
|
|
2
3
|
/** Label of the tab */
|
|
3
|
-
label
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Start icon of the tab */
|
|
6
|
+
startIcon?: ReactElement;
|
|
7
|
+
/** End icon of the tab */
|
|
8
|
+
endIcon?: ReactElement;
|
|
4
9
|
/** Optional value associated with the tab */
|
|
5
10
|
value?: string | number;
|
|
6
11
|
/** Whether the tab is active */
|
package/dist/cjs/index.js
CHANGED
|
@@ -2485,6 +2485,7 @@ const TAB_ITEM_STYLES = theme.createStyles((theme) => ({
|
|
|
2485
2485
|
display: 'flex',
|
|
2486
2486
|
alignItems: 'center',
|
|
2487
2487
|
justifyContent: 'center',
|
|
2488
|
+
gap: theme.spacing.md,
|
|
2488
2489
|
backgroundColor: isActive ? theme.colors.background : 'transparent',
|
|
2489
2490
|
color: isActive ? theme.colors.text : theme.colors.textSecondary,
|
|
2490
2491
|
boxShadow: isActive ? theme.shadows.sm : undefined,
|
|
@@ -2497,8 +2498,8 @@ const TAB_ITEM_STYLES = theme.createStyles((theme) => ({
|
|
|
2497
2498
|
/**
|
|
2498
2499
|
* TabItem component for use inside Tabs
|
|
2499
2500
|
*/
|
|
2500
|
-
const TabItem = ({ label, isActive = false, onClick, }) => {
|
|
2501
|
-
return (jsxRuntime.
|
|
2501
|
+
const TabItem = ({ label, isActive = false, onClick, startIcon, endIcon }) => {
|
|
2502
|
+
return (jsxRuntime.jsxs("div", { className: TAB_ITEM_STYLES.tab(isActive), onClick: onClick, children: [startIcon && (jsxRuntime.jsx(Icon, { children: startIcon })), label && (jsxRuntime.jsx(Text, { variant: 'label', preserveWhitespace: true, maxLines: 1, children: label })), endIcon && (jsxRuntime.jsx(Icon, { children: endIcon }))] }));
|
|
2502
2503
|
};
|
|
2503
2504
|
TabItem.displayName = 'TabItem';
|
|
2504
2505
|
|