Skip to content

Commit ba0f2e3

Browse files
committed
Export split component as Split instead of separate ones
I've removed exports for `SplitViewHost` & `SplitViewScreen` in favour of `Split.Host` & `Split.Column` / `Split.Inspector`. The naming here is open for discussion. I prefer short version of `Split` instead of `SplitView`, but that's matter of preference, can't find reasonable (& clinching) arguments for one or the other. Most important thing here is to just make it consistent. If we are to use `View` suffix, then we should do similar thing for Stack -> `StackView.Host` & `StackView.Screen`. So it's either: `Stack.Host`, `Stack.Screen`, `Tabs.Host`, `Tabs.Screen`, `Split.Host`, `Split.Column`, `Split.Inspector` OR `StackView.Host`, `StackView.Screen`, `TabsView.Host`, `TabsView.Screen`, `SplitView.Host`, `SplitView.Column`, `SplitView.Inspector` OR MAYBE (?) `Stack.HostView`, `Stack.ScreenView`, `Tabs.HostView`, `Tabs.ScreenView`, `Split.HostView`, `Split.ColumnView`, `Split.InspectorView`
1 parent 94c1d71 commit ba0f2e3

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import SplitViewHost from './SplitViewHost';
2+
import SplitViewScreen from './SplitViewScreen';
3+
4+
export * from './SplitViewHost.types';
5+
export * from './SplitViewScreen.types';
6+
7+
const Split = {
8+
Host: SplitViewHost,
9+
Column: SplitViewScreen.Column,
10+
Inspector: SplitViewScreen.Inspector,
11+
};
12+
13+
export default Split;

src/experimental/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ export {
1313
StackScreenLifecycleState,
1414
} from '../components/gamma/stack';
1515

16-
export { default as SplitViewHost } from '../components/gamma/split-view/SplitViewHost';
17-
export { default as SplitViewScreen } from '../components/gamma/split-view/SplitViewScreen';
16+
export { default as Split } from '../components/gamma/split-view/';
1817
export { default as SafeAreaView } from '../components/safe-area/SafeAreaView';

0 commit comments

Comments
 (0)