ServerDrawer: also copy SettingsScaffold/NoteBox locally - zero shared references
This commit is contained in:
parent
eb6c57b12a
commit
daac5afebe
3 changed files with 39 additions and 2 deletions
24
plugins/server-drawer/src/ui/NoteBox.tsx
Normal file
24
plugins/server-drawer/src/ui/NoteBox.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { React, ReactNative } from "@vendetta/metro/common";
|
||||
|
||||
const { View, Text } = ReactNative;
|
||||
|
||||
/** Small bordered callout for explanatory text in a settings screen - theme-agnostic by design. */
|
||||
export default function NoteBox({ children, style }: { children: any; style?: any }) {
|
||||
return (
|
||||
<View
|
||||
style={[
|
||||
{
|
||||
marginHorizontal: 16,
|
||||
marginVertical: 8,
|
||||
padding: 10,
|
||||
borderRadius: 8,
|
||||
borderWidth: 1,
|
||||
borderColor: "rgba(128,128,128,0.25)"
|
||||
},
|
||||
style
|
||||
]}
|
||||
>
|
||||
<Text style={{ fontSize: 12.5, lineHeight: 18, opacity: 0.75 }}>{children}</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
@ -2,8 +2,8 @@ import { React } from "@vendetta/metro/common";
|
|||
import { storage } from "@vendetta/plugin";
|
||||
import { useProxy } from "@vendetta/storage";
|
||||
import { Forms } from "@vendetta/ui/components";
|
||||
import SettingsScaffold from "@shared/ui/SettingsScaffold";
|
||||
import NoteBox from "@shared/ui/NoteBox";
|
||||
import SettingsScaffold from "./SettingsScaffold";
|
||||
import NoteBox from "./NoteBox";
|
||||
import { restart } from "../index";
|
||||
|
||||
const { FormSection, FormSwitchRow } = Forms;
|
||||
|
|
|
|||
13
plugins/server-drawer/src/ui/SettingsScaffold.tsx
Normal file
13
plugins/server-drawer/src/ui/SettingsScaffold.tsx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { React, ReactNative } from "@vendetta/metro/common";
|
||||
|
||||
const { ScrollView, View } = ReactNative;
|
||||
|
||||
/** Consistent wrapper for the settings screen: scroll view + bottom breathing room. */
|
||||
export default function SettingsScaffold({ children }: { children: any }) {
|
||||
return (
|
||||
<ScrollView style={{ flex: 1 }}>
|
||||
{children}
|
||||
<View style={{ height: 24 }} />
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue