diff --git a/src/ui/components/Summary.tsx b/src/ui/components/Summary.tsx new file mode 100644 index 0000000..21a591a --- /dev/null +++ b/src/ui/components/Summary.tsx @@ -0,0 +1,32 @@ +import { getAssetIDByName } from "@ui/assets"; +import { ReactNative as RN } from "@metro/common"; +import { Forms } from "@ui/components"; + +// TODO: Animated would be awesome +// TODO: Destructuring Forms doesn't work here. Why? + +interface SummaryProps { + label: string; + icon?: string; + noPadding?: boolean; + children: JSX.Element | JSX.Element[]; +} + +export default function Summary({ label, icon, noPadding = false, children }: SummaryProps) { + const [hidden, setHidden] = React.useState(true); + + return ( + <> + } + trailing={} + onPress={() => setHidden(!hidden)} + /> + {!hidden && <> + + {children} + } + + ) +} \ No newline at end of file diff --git a/src/ui/components/index.ts b/src/ui/components/index.ts new file mode 100644 index 0000000..8eff4f1 --- /dev/null +++ b/src/ui/components/index.ts @@ -0,0 +1,9 @@ +import { findByDisplayName, findByProps } from "@metro/filters"; + +// Discord +export const Forms = findByProps("Form", "FormSection"); +export const General = findByProps("Button", "Text", "View"); +export const Search = findByDisplayName("StaticSearchBarContainer"); + +// Vendetta +export { default as Summary } from "@ui/components/Summary"; \ No newline at end of file