feat: export SelectorObject interface

This commit is contained in:
karishmas6
2024-08-10 04:10:00 +05:30
parent 21a34a1882
commit c4ebffaf6c

View File

@@ -23,7 +23,7 @@ interface ListStep {
type BrowserStep = TextStep | ScreenshotStep | ListStep;
interface SelectorObject {
export interface SelectorObject {
selector: string;
tag?: string;
attribute?: string;
@@ -77,6 +77,14 @@ export const BrowserStepsProvider: React.FC<{ children: React.ReactNode }> = ({
);
};
const updateListStep = (id: number, updatedListStep: ListStep) => {
setBrowserSteps(prevSteps =>
prevSteps.map(step =>
step.id === id && step.type === 'list' ? updatedListStep : step
)
);
};
return (
<BrowserStepsContext.Provider value={{
browserSteps,