@homebound/beam 2.80.6 → 2.80.7
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.
|
@@ -7,7 +7,6 @@ export interface Tab<V extends string = string> {
|
|
|
7
7
|
icon?: IconKey;
|
|
8
8
|
endAdornment?: ReactNode;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
-
render: () => ReactNode;
|
|
11
10
|
}
|
|
12
11
|
declare type TabsContentXss = Xss<Margin>;
|
|
13
12
|
export interface TabsProps<V extends string, X> {
|
|
@@ -25,6 +24,18 @@ export interface RouteTab<V extends string = string> extends Omit<Tab<V>, "value
|
|
|
25
24
|
href: V;
|
|
26
25
|
path: string | string[];
|
|
27
26
|
}
|
|
27
|
+
export interface TabWithContent<V extends string = string> extends Omit<Tab<V>, "render"> {
|
|
28
|
+
render: () => ReactNode;
|
|
29
|
+
}
|
|
30
|
+
export interface RouteTabWithContent<V extends string = string> extends Omit<RouteTab<V>, "render"> {
|
|
31
|
+
render: () => ReactNode;
|
|
32
|
+
}
|
|
33
|
+
interface RequiredRenderTabs<V extends string, X> extends Omit<TabsProps<V, X>, "tabs"> {
|
|
34
|
+
tabs: TabWithContent<V>[];
|
|
35
|
+
}
|
|
36
|
+
interface RequiredRenderRouteTabs<V extends string, X> extends Omit<RouteTabsProps<V, X>, "tabs"> {
|
|
37
|
+
tabs: RouteTabWithContent<V>[];
|
|
38
|
+
}
|
|
28
39
|
/**
|
|
29
40
|
* Provides a list of tabs and their content.
|
|
30
41
|
*
|
|
@@ -34,8 +45,8 @@ export interface RouteTab<V extends string = string> extends Omit<Tab<V>, "value
|
|
|
34
45
|
* If you want to tease apart Tabs from their TabContent, you can use the `Tab`
|
|
35
46
|
* and `TabContent` components directly.
|
|
36
47
|
*/
|
|
37
|
-
export declare function TabsWithContent<V extends string, X extends Only<TabsContentXss, X>>(props:
|
|
38
|
-
export declare function TabContent<V extends string>(props: Omit<
|
|
48
|
+
export declare function TabsWithContent<V extends string, X extends Only<TabsContentXss, X>>(props: RequiredRenderTabs<V, X> | RequiredRenderRouteTabs<V, X>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare function TabContent<V extends string>(props: Omit<RequiredRenderTabs<V, {}>, "onChange"> | RequiredRenderRouteTabs<V, {}>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
50
|
/** The top list of tabs. */
|
|
40
51
|
export declare function Tabs<V extends string>(props: TabsProps<V, {}> | RouteTabsProps<V, {}>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
41
52
|
export declare function getTabStyles(): {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { TabWithContent } from "./Tabs";
|
|
3
3
|
export declare type TabValue = "tab1" | "tab2" | "tab3" | "tab4";
|
|
4
|
-
export declare const testTabs:
|
|
4
|
+
export declare const testTabs: TabWithContent<TabValue>[];
|
|
5
5
|
export declare function TestTabContent({ content }: {
|
|
6
6
|
content: ReactNode;
|
|
7
7
|
}): import("@emotion/react/jsx-runtime").JSX.Element;
|