feat: scrape action

This commit is contained in:
karishmas6
2024-06-22 19:59:47 +05:30
parent 4f36f93076
commit d358a2b2b2

View File

@@ -0,0 +1,30 @@
import React, { forwardRef, useImperativeHandle } from 'react';
import { Stack, TextField } from "@mui/material";
import { WarningText } from '../../atoms/texts';
import InfoIcon from "@mui/icons-material/Info";
export const ScrapeSettings = forwardRef((props, ref) => {
const [settings, setSettings] = React.useState<string>('');
useImperativeHandle(ref, () => ({
getSettings() {
return settings;
}
}));
return (
<Stack direction="column">
<TextField
sx={{marginLeft: '15px', marginRight: '15px'}}
type="string"
label="Selector"
onChange={(e) => setSettings(e.target.value)}
/>
<WarningText>
<InfoIcon color='warning'/>
The scrape function uses heuristic algorithm to automatically scrape only important data from the page.
If a selector is used it will scrape and automatically parse all available
data inside of the selected element(s).
</WarningText>
</Stack>
);
});