2026-08-01 10:34:47 -04:00
|
|
|
import { React, ReactNative } from "@vendetta/metro/common";
|
2026-08-02 20:15:44 -04:00
|
|
|
import { resolveSemanticColorSafe } from "../lib/color";
|
2026-08-01 10:34:47 -04:00
|
|
|
|
|
|
|
|
const { View, Text } = ReactNative;
|
|
|
|
|
|
2026-08-02 20:15:44 -04:00
|
|
|
/**
|
|
|
|
|
* Small bordered callout for explanatory text in a settings screen. Text color used to be
|
|
|
|
|
* unset entirely - React Native's Text defaults to black with no explicit color, which is
|
|
|
|
|
* illegible on Discord's dark theme (the default for most users). Explicit theme-aware color now,
|
|
|
|
|
* same resolveSemanticColorSafe fallback-chain pattern used everywhere else in this repo.
|
|
|
|
|
*/
|
2026-08-01 10:34:47 -04:00
|
|
|
export default function NoteBox({ children, style }: { children: any; style?: any }) {
|
2026-08-02 20:15:44 -04:00
|
|
|
const textColor = resolveSemanticColorSafe(["TEXT_NORMAL", "TEXT_DEFAULT", "TEXT_MUTED"], "#96989d");
|
|
|
|
|
|
2026-08-01 10:34:47 -04:00
|
|
|
return (
|
|
|
|
|
<View
|
|
|
|
|
style={[
|
|
|
|
|
{
|
|
|
|
|
marginHorizontal: 16,
|
|
|
|
|
marginVertical: 8,
|
|
|
|
|
padding: 10,
|
|
|
|
|
borderRadius: 8,
|
|
|
|
|
borderWidth: 1,
|
|
|
|
|
borderColor: "rgba(128,128,128,0.25)"
|
|
|
|
|
},
|
|
|
|
|
style
|
|
|
|
|
]}
|
|
|
|
|
>
|
2026-08-02 20:15:44 -04:00
|
|
|
<Text style={{ fontSize: 12.5, lineHeight: 18, opacity: 0.75, color: textColor }}>{children}</Text>
|
2026-08-01 10:34:47 -04:00
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
}
|