Skip to content

Commit

Permalink
relay on native-base stacks for now (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf authored May 17, 2022
1 parent d8f91de commit 1f4a963
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions packages/ui/components/sidebarButton/SidebarButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { StyleSheet } from "react-native";
import { Stack } from "@mobily/stacks";
import { HStack } from "native-base";
import { tw } from "../../tailwind";
import { Pressable, PressableProps } from "../pressable/Pressable";

Expand Down Expand Up @@ -32,9 +32,7 @@ export const SidebarButton = React.forwardRef(
_web: { style: [{ outlineWidth: 0 }, tw`se-inset-focus-mini`] },
}}
>
<Stack space={2} horizontal={true} align="center">
{children}
</Stack>
<HStack space={2}>{children}</HStack>
</Pressable>
);
}
Expand Down
6 changes: 2 additions & 4 deletions packages/ui/components/sidebarLink/SidebarLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { NavigationAction } from "@react-navigation/core";
import { GestureResponderEvent, TextProps, StyleSheet } from "react-native";
import { To } from "@react-navigation/native/lib/typescript/src/useLinkTo";
import { useFocusRing } from "@react-native-aria/focus";
import { Stack } from "@mobily/stacks";
import { HStack } from "native-base";

// copied from react-navigation type definitions
declare type SidebarLinkProps<ParamList extends ReactNavigation.RootParamList> =
Expand Down Expand Up @@ -49,9 +49,7 @@ export function SidebarLink<ParamList extends ReactNavigation.RootParamList>(
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
<Stack space={2} horizontal={true} align="left">
{props.children}
</Stack>
<HStack space={2}>{props.children}</HStack>
</ReactNavigationLink>
);
}

0 comments on commit 1f4a963

Please sign in to comment.