Skip to content

Commit be0b4df

Browse files
committed
fix: export Panel and ResizablePanel
1 parent cf1976c commit be0b4df

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

src/components/layout/ResizablePanel.stories.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ import { Meta, StoryFn } from '@storybook/react';
22
import { useState } from 'react';
33

44
import { Panel } from './Panel';
5-
import { ResizablePanel, ResizablePanelProps } from './ResizablePanel';
5+
import { ResizablePanel, CubeResizablePanelProps } from './ResizablePanel';
66

77
export default {
88
title: 'Layout/ResizablePanel',
99
component: ResizablePanel,
1010
args: {},
11-
} as Meta<ResizablePanelProps>;
11+
} as Meta<CubeResizablePanelProps>;
1212

13-
const TemplateRight: StoryFn<ResizablePanelProps> = (args) => (
13+
const TemplateRight: StoryFn<CubeResizablePanelProps> = (args) => (
1414
<Panel isFlex isStretched height="min 30x" fill="#white">
1515
<ResizablePanel {...args} />
1616
<Panel fill="#light"></Panel>
1717
</Panel>
1818
);
1919

20-
const TemplateLeft: StoryFn<ResizablePanelProps> = (args) => {
20+
const TemplateLeft: StoryFn<CubeResizablePanelProps> = (args) => {
2121
return (
2222
<Panel isFlex isStretched height="min 30x" fill="#white">
2323
<Panel fill="#light"></Panel>
@@ -26,14 +26,14 @@ const TemplateLeft: StoryFn<ResizablePanelProps> = (args) => {
2626
);
2727
};
2828

29-
const TemplateBottom: StoryFn<ResizablePanelProps> = (args) => (
29+
const TemplateBottom: StoryFn<CubeResizablePanelProps> = (args) => (
3030
<Panel isFlex isStretched flow="column" height="min 30x" fill="#white">
3131
<ResizablePanel {...args} />
3232
<Panel fill="#light"></Panel>
3333
</Panel>
3434
);
3535

36-
const TemplateTop: StoryFn<ResizablePanelProps> = (args) => {
36+
const TemplateTop: StoryFn<CubeResizablePanelProps> = (args) => {
3737
return (
3838
<Panel isFlex isStretched flow="column" height="min 30x" fill="#white">
3939
<Panel fill="#light"></Panel>
@@ -42,7 +42,7 @@ const TemplateTop: StoryFn<ResizablePanelProps> = (args) => {
4242
);
4343
};
4444

45-
const TemplateControllable: StoryFn<ResizablePanelProps> = (args) => {
45+
const TemplateControllable: StoryFn<CubeResizablePanelProps> = (args) => {
4646
const [size, setSize] = useState(200);
4747

4848
return (

src/components/layout/ResizablePanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { Panel, CubePanelProps, PanelContext } from './Panel';
1515

1616
type Direction = 'top' | 'right' | 'bottom' | 'left';
1717

18-
export interface ResizablePanelProps extends CubePanelProps {
18+
export interface CubeResizablePanelProps extends CubePanelProps {
1919
handlerStyles?: Styles;
2020
direction: Direction;
2121
size?: number;
@@ -163,7 +163,7 @@ const PanelElement = tasty(Panel, {
163163
});
164164

165165
function ResizablePanel(
166-
props: ResizablePanelProps,
166+
props: CubeResizablePanelProps,
167167
ref: ForwardedRef<HTMLDivElement>,
168168
) {
169169
const panelContext = useContext(PanelContext);

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export { Space } from './components/layout/Space';
2424
export type { CubeSpaceProps } from './components/layout/Space';
2525
export { Flow } from './components/layout/Flow';
2626
export type { CubeFlowProps } from './components/layout/Flow';
27+
export { Panel } from './components/layout/Panel';
28+
export type { CubePanelProps } from './components/layout/Panel';
29+
export { ResizablePanel } from './components/layout/ResizablePanel';
30+
export type { CubeResizablePanelProps } from './components/layout/ResizablePanel';
2731
export { Root } from './components/Root';
2832
export type { CubeRootProps } from './components/Root';
2933
export { PrismCode } from './components/content/PrismCode/PrismCode';

0 commit comments

Comments
 (0)