diff --git a/lib/components/package.json b/lib/components/package.json index e71d27a..72f70b3 100644 --- a/lib/components/package.json +++ b/lib/components/package.json @@ -20,6 +20,9 @@ }, "./types": { "types": "./src/types.ts" + }, + "./_": { + "default": "./src/_internal.ts" } } } diff --git a/lib/components/src/FormSwitch.tsx b/lib/components/src/FormSwitch.tsx index 85e1f8c..d4449e0 100644 --- a/lib/components/src/FormSwitch.tsx +++ b/lib/components/src/FormSwitch.tsx @@ -1,5 +1,6 @@ import { FormSwitch as Switch } from '@revenge-mod/discord/design' -import { StyleSheet, View } from 'react-native' +import { View } from 'react-native' +import { styles } from './_internal' import type { DiscordModules } from '@revenge-mod/discord/types' /** @@ -14,9 +15,3 @@ export default function FormSwitch( ) } - -const styles = StyleSheet.create({ - disabled: { - opacity: 0.5, - }, -}) diff --git a/lib/components/src/Page.tsx b/lib/components/src/Page.tsx index 1678900..2733d2d 100644 --- a/lib/components/src/Page.tsx +++ b/lib/components/src/Page.tsx @@ -1,19 +1,15 @@ import { Design } from '@revenge-mod/discord/design' -import { StyleSheet } from 'react-native' +import { PageSpacing, styles } from './_internal' import type { DiscordModules } from '@revenge-mod/discord/types' export default function Page(props: DiscordModules.Components.StackProps) { return ( - + {props.children} ) } - -const styles = StyleSheet.create({ - page: { - flex: 1, - paddingHorizontal: 16, - paddingTop: 12, - }, -}) diff --git a/lib/components/src/_internal.ts b/lib/components/src/_internal.ts new file mode 100644 index 0000000..816d3fc --- /dev/null +++ b/lib/components/src/_internal.ts @@ -0,0 +1,19 @@ +import { StyleSheet } from 'react-native' + +export const styles = StyleSheet.create({ + disabled: { + opacity: 0.5, + }, + flex: { + flex: 1, + }, + grow: { + flexGrow: 1, + }, + pagePadding: { + paddingHorizontal: 16, + paddingTop: 12, + }, +}) + +export const PageSpacing = 24