From c69bc66b4854c514a36ea1ff0dbf59d66cbac4fa Mon Sep 17 00:00:00 2001 From: Jean-Baptiste DESBAS Date: Thu, 8 Aug 2024 14:56:57 +0200 Subject: [PATCH] controls cf #29 --- src/components/Control/Control.tsx | 24 ++++++++++++++++++++++++ src/index.ts | 5 +++-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/components/Control/Control.tsx diff --git a/src/components/Control/Control.tsx b/src/components/Control/Control.tsx new file mode 100644 index 0000000..62175d2 --- /dev/null +++ b/src/components/Control/Control.tsx @@ -0,0 +1,24 @@ +import { Layout } from "antd" +import { CSSProperties, ReactNode } from "react" + +const {Header} = Layout + +interface IControlProps { + children: ReactNode; + style?:CSSProperties +} + +/* +* Composant destiné à recevoir un Form avec les contrôles de la page +*/ +const Control: React.FC = ({ children, style = {} }) => { + return ( +
+ {children} +
+ ); +}; + +export default Control; \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 39adad5..ba4b1ba 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,8 +16,9 @@ import LoadingContainer from "./components/LoadingContainer/LoadingContainer" import FlipCard from "./components/FlipCard/FlipCard" import Attribution from "./components/Attributions/Attributions" import NextPrevSelect from "./components/NextPrevSelect/NextPrevSelect" +import Control from "./components/Control/Control"; -export { KeyFigure, DashboardElement, LoadingContainer, FlipCard, Attribution, NextPrevSelect } +export { KeyFigure, DashboardElement, LoadingContainer, FlipCard, Attribution, NextPrevSelect, Control } // DataProviders @@ -28,4 +29,4 @@ export {WfsProvider, DatafairProvider} // Types -export type { SimpleRecord } from "./types" \ No newline at end of file +export type { SimpleRecord } from "./types"