From 9d6562117e75faa8fbbbdeaee3dd2acc6fd1f133 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 22 Jun 2024 20:00:03 +0530 Subject: [PATCH] feat: scrape schema action --- .../action-settings/scrapeSchema.tsx | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/components/molecules/action-settings/scrapeSchema.tsx diff --git a/src/components/molecules/action-settings/scrapeSchema.tsx b/src/components/molecules/action-settings/scrapeSchema.tsx new file mode 100644 index 00000000..3914a01a --- /dev/null +++ b/src/components/molecules/action-settings/scrapeSchema.tsx @@ -0,0 +1,25 @@ +import React, { forwardRef, useCallback, useImperativeHandle, useRef } from 'react'; +import { WarningText } from "../../atoms/texts"; +import InfoIcon from "@mui/icons-material/Info"; +import { KeyValueForm } from "../KeyValueForm"; + +export const ScrapeSchemaSettings = forwardRef((props, ref) => { + const keyValueFormRef = useRef<{getObject: () => object}>(null); + + useImperativeHandle(ref, () => ({ + getSettings() { + const settings = keyValueFormRef.current?.getObject() as Record + return settings; + } + })); + + return ( +
+ + + The interpreter scrapes the data from a webpage into a "curated" table. + + +
+); +});