listpage-next 0.0.216 → 0.0.217

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,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface TabProps {
3
- tabs: {
3
+ items: {
4
4
  icon?: ReactNode;
5
5
  label: string;
6
6
  value: string;
@@ -9,4 +9,4 @@ export interface TabProps {
9
9
  value?: string;
10
10
  onChange?: (tab: string) => void;
11
11
  }
12
- export declare const Tab: (props: TabProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const Tabs: (props: TabProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,13 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useControllableValue } from "ahooks";
3
3
  import { styled } from "styled-components";
4
- const Tab = (props)=>{
5
- const { tabs } = props;
4
+ const Tabs = (props)=>{
5
+ const { items } = props;
6
6
  const [activeTab, setActiveTab] = useControllableValue(props);
7
7
  return /*#__PURE__*/ jsxs(TabContainer, {
8
8
  children: [
9
9
  /*#__PURE__*/ jsx(TabHeader, {
10
- children: tabs.map((tab)=>/*#__PURE__*/ jsxs(TabItem, {
10
+ children: items.map((tab)=>/*#__PURE__*/ jsxs(TabItem, {
11
11
  $active: tab.value === activeTab,
12
12
  onClick: ()=>setActiveTab(tab.value),
13
13
  children: [
@@ -19,7 +19,7 @@ const Tab = (props)=>{
19
19
  }, tab.value))
20
20
  }),
21
21
  /*#__PURE__*/ jsx(TabContent, {
22
- children: tabs.find((t)=>t.value === activeTab)?.children
22
+ children: items.find((t)=>t.value === activeTab)?.children
23
23
  })
24
24
  ]
25
25
  });
@@ -74,4 +74,4 @@ const TabContent = styled.div`
74
74
  const IconContainer = styled.span`
75
75
  margin-right: 4px;
76
76
  `;
77
- export { Tab };
77
+ export { Tabs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "listpage-next",
3
- "version": "0.0.216",
3
+ "version": "0.0.217",
4
4
  "description": "A React component library for creating filter forms with Ant Design",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",