diff --git a/docs/examples/ant-design.tsx b/docs/examples/ant-design.tsx index b1ee0183..dd7cabe2 100644 --- a/docs/examples/ant-design.tsx +++ b/docs/examples/ant-design.tsx @@ -12,41 +12,33 @@ const clearPath = ' 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-' + '28.7 64-64V306c0-35.3-28.7-64-64-64z'; -const getSvg = (path: string, props = {}, align = false) => { - return ( - - - - ); -}; +const getSvg = (path: string, props = {}, align = false) => ( + + + +); -const MyControl = () => { +const MyControl: React.FC = () => { const [visible1, setVisible1] = React.useState(true); const [visible2, setVisible2] = React.useState(false); const [visible3, setVisible3] = React.useState(false); const [width, setWidth] = React.useState(600); const [destroyOnClose, setDestroyOnClose] = React.useState(false); const [center, setCenter] = React.useState(false); - const [mousePosition, setMousePosition] = React.useState({ - x: null, - y: null, - }); + const [mousePosition, setMousePosition] = React.useState({ x: null, y: null }); const [useIcon, setUseIcon] = React.useState(false); const [forceRender, setForceRender] = React.useState(false); const onClick = (e: React.MouseEvent) => { - setMousePosition({ - x: e.pageX, - y: e.pageY, - }); + setMousePosition({ x: e.pageX, y: e.pageY }); setVisible1(true); }; diff --git a/docs/examples/bootstrap.tsx b/docs/examples/bootstrap.tsx index c5535896..7a57b413 100644 --- a/docs/examples/bootstrap.tsx +++ b/docs/examples/bootstrap.tsx @@ -1,15 +1,15 @@ -import 'bootstrap/dist/css/bootstrap.css'; -import * as React from 'react'; +import React from 'react'; import Dialog from 'rc-dialog'; +import 'bootstrap/dist/css/bootstrap.css'; import '../../assets/bootstrap.less'; // Check for memo update should work -const InnerRender = () => { +const InnerRender: React.FC = () => { console.log('Updated...', Date.now()); return null; }; -const MyControl = () => { +const MyControl: React.FC = () => { const [visible, setVisible] = React.useState(false); const [destroyOnClose, setDestroyOnClose] = React.useState(false); diff --git a/docs/examples/draggable.tsx b/docs/examples/draggable.tsx index 789d5666..0835feb2 100644 --- a/docs/examples/draggable.tsx +++ b/docs/examples/draggable.tsx @@ -1,24 +1,24 @@ import 'bootstrap/dist/css/bootstrap.css'; import * as React from 'react'; -import Draggable from 'react-draggable'; +import Draggable from 'react-draggable'; import Dialog from 'rc-dialog'; import '../../assets/index.less'; -const MyControl = () => { +const MyControl: React.FC = () => { const [visible, setVisible] = React.useState(false); const [disabled, setDisabled] = React.useState(true); const onClick = () => { setVisible(true); - } - + }; const onClose = () => { setVisible(false); - } - + }; return (
- +
+ +
); const drawer = ( -