ServerDrawer: also copy SettingsScaffold/NoteBox locally - zero shared references

This commit is contained in:
everestmcarthur 2026-08-01 23:12:49 -04:00
parent eb6c57b12a
commit daac5afebe
3 changed files with 39 additions and 2 deletions

View 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>
);
}

View file

@ -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;

View 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>
);
}