import { Text } from "preact-i18n"; import { ModalForm } from "@revoltchat/ui"; import { state } from "../../../mobx/State"; import { ModalProps } from "../types"; /** * Import theme modal */ export default function ImportTheme({ ...props }: ModalProps<"import_theme">) { return ( } schema={{ data: "text", }} data={{ data: { field: ( ) as React.ReactChild, }, }} callback={async ({ data }) => state.settings.theme.hydrate(JSON.parse(data)) } submit={{ children: , }} /> ); }