feat: scroll action
This commit is contained in:
21
src/components/molecules/action-settings/scroll.tsx
Normal file
21
src/components/molecules/action-settings/scroll.tsx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import React, { forwardRef, useImperativeHandle } from 'react';
|
||||||
|
import { TextField } from "@mui/material";
|
||||||
|
|
||||||
|
export const ScrollSettings = forwardRef((props, ref) => {
|
||||||
|
const [settings, setSettings] = React.useState<number>(0);
|
||||||
|
useImperativeHandle(ref, () => ({
|
||||||
|
getSettings() {
|
||||||
|
return settings;
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
return (
|
||||||
|
<TextField
|
||||||
|
sx={{marginLeft: '15px'}}
|
||||||
|
type="number"
|
||||||
|
label="Number of pages"
|
||||||
|
required
|
||||||
|
onChange={(e) => setSettings(parseInt(e.target.value))}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user