import { ReactNative as RN, stylesheet } from "@metro/common"; import { Forms } from "@ui/components"; import { Plugin } from "@types"; import { getAssetIDByName } from "@/ui/assets"; const { FormRow, FormText, FormSwitch } = Forms; const styles = stylesheet.createThemedStyleSheet({ card: { backgroundColor: stylesheet.ThemeColorMap.BACKGROUND_SECONDARY, borderRadius: 5, margin: 10, }, header: { backgroundColor: stylesheet.ThemeColorMap.BACKGROUND_TERTIARY, borderTopLeftRadius: 5, borderTopRightRadius: 5, } }) interface PluginCardProps { plugin: Plugin; } export default function PluginCard({ plugin }: PluginCardProps) { const [enabled, setEnabled] = React.useState(plugin.enabled); return ( } trailing={ { setEnabled(v); plugin.enabled = enabled; }} /> } /> ) }