@app-studio/web 0.8.63 → 0.8.64

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.
@@ -9,4 +9,6 @@ export interface TabsViewProps extends TabsProps {
9
9
  setIsActive: React.Dispatch<React.SetStateAction<Tab>>;
10
10
  tabsState: Tab[];
11
11
  setTabsState: React.Dispatch<React.SetStateAction<Tab[]>>;
12
+ renderTab?: (tab: Tab, isActive: boolean, index: number) => React.ReactNode;
13
+ renderContent?: (tab: Tab, index: number) => React.ReactNode;
12
14
  }
@@ -7678,7 +7678,9 @@ var TabsView = props => {
7678
7678
  isActive,
7679
7679
  setIsActive,
7680
7680
  tabsState,
7681
- setTabsState
7681
+ setTabsState,
7682
+ renderTab,
7683
+ renderContent
7682
7684
  } = props;
7683
7685
  // Declares a function 'moveSelectedTabToTop' that takes an index and modifies the tabs order.
7684
7686
  var moveSelectedTabToTop = idx => {
@@ -7699,11 +7701,9 @@ var TabsView = props => {
7699
7701
  return tab.value === tabsState[0].value;
7700
7702
  };
7701
7703
  return /*#__PURE__*/React__default.createElement(Vertical, Object.assign({
7702
- width: "100w",
7704
+ width: "100%",
7703
7705
  height: '100%'
7704
- }, styles == null ? void 0 : styles.container), /*#__PURE__*/React__default.createElement(Horizontal, Object.assign({
7705
- marginBottom: 20
7706
- }, styles == null ? void 0 : styles.headerTabs), tabs.map((tab, idx) => (/*#__PURE__*/React__default.createElement(Button, Object.assign({
7706
+ }, styles == null ? void 0 : styles.container), /*#__PURE__*/React__default.createElement(Horizontal, Object.assign({}, styles == null ? void 0 : styles.headerTabs), tabs.map((tab, idx) => renderTab ? renderTab(tab, isContentActive(tab), idx) : (/*#__PURE__*/React__default.createElement(Button, Object.assign({
7707
7707
  key: tab.title,
7708
7708
  onClick: () => {
7709
7709
  moveSelectedTabToTop(idx);
@@ -7711,11 +7711,12 @@ var TabsView = props => {
7711
7711
  variant: isActive.value === tab.value ? 'filled' : 'ghost',
7712
7712
  shape: "pillShaped",
7713
7713
  cursor: "pointer",
7714
- isAuto: true
7714
+ isAuto: true,
7715
+ margin: 10
7715
7716
  }, styles == null ? void 0 : styles.tab, isActive.value === tab.value ? styles == null ? void 0 : styles.activeTab : {}), /*#__PURE__*/React__default.createElement(Text, Object.assign({}, styles == null ? void 0 : styles.title, isActive.value === tab.value ? styles == null ? void 0 : styles.activeText : {}), tab.title))))), /*#__PURE__*/React__default.createElement(View, Object.assign({
7716
7717
  width: '100%',
7717
7718
  height: "100%"
7718
- }, styles == null ? void 0 : styles.content), tabsState.map((tab, idx) => isContentActive(tab) && /*#__PURE__*/React__default.createElement(View, {
7719
+ }, styles == null ? void 0 : styles.content), tabsState.map(renderContent ? renderContent : (tab, idx) => isContentActive(tab) && /*#__PURE__*/React__default.createElement(View, {
7719
7720
  key: idx
7720
7721
  }, tab.content))));
7721
7722
  };