@aurora-ds/components 0.17.12 → 0.17.13

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.
@@ -1,6 +1,10 @@
1
1
  export type TabItemProps = {
2
2
  /** Label of the tab */
3
- label: string;
3
+ label?: string;
4
+ /** Start icon of the tab */
5
+ startIcon?: string;
6
+ /** End icon of the tab */
7
+ endIcon?: string;
4
8
  /** Optional value associated with the tab */
5
9
  value?: string | number;
6
10
  /** 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.jsx("div", { className: TAB_ITEM_STYLES.tab(isActive), onClick: onClick, children: jsxRuntime.jsx(Text, { variant: 'label', preserveWhitespace: true, maxLines: 1, children: label }) }));
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