From 599cf015b329db00b32efe4f3e55c1e79819926d Mon Sep 17 00:00:00 2001 From: vapersmile <120370047+vapersmile@users.noreply.github.com> Date: Tue, 17 Oct 2023 11:01:46 +0200 Subject: [PATCH] feat: (redmine 1257480): add change from pr review (#41) * feat(redmine 1257480): add structure * feat(redmine 1257480): 2 structures Ok * feat: (redmine 1257480): add grid and change name of the component * feat: (redmine 1257480): add change from pr review --- .../DocumentDetails.stories.tsx | 20 ++ .../Pages/DocumentDetails/DocumentDetails.tsx | 240 ++++++++++++++++++ packages/react-front-kit/src/index.tsx | 1 + 3 files changed, 261 insertions(+) create mode 100644 packages/react-front-kit/src/Pages/DocumentDetails/DocumentDetails.stories.tsx create mode 100644 packages/react-front-kit/src/Pages/DocumentDetails/DocumentDetails.tsx diff --git a/packages/react-front-kit/src/Pages/DocumentDetails/DocumentDetails.stories.tsx b/packages/react-front-kit/src/Pages/DocumentDetails/DocumentDetails.stories.tsx new file mode 100644 index 00000000..f8a0a7a9 --- /dev/null +++ b/packages/react-front-kit/src/Pages/DocumentDetails/DocumentDetails.stories.tsx @@ -0,0 +1,20 @@ +'use client'; + +import type { Meta, StoryObj } from '@storybook/react'; + +import { DocumentDetails as Cmp } from './DocumentDetails'; + +const meta = { + component: Cmp, + parameters: { + layout: 'fullscreen', + }, + title: '3-Custom/Pages/DocumentDetails', +} satisfies Meta; + +export default meta; +type IStory = StoryObj; + +export const DocumentDetails: IStory = { + args: {}, +}; diff --git a/packages/react-front-kit/src/Pages/DocumentDetails/DocumentDetails.tsx b/packages/react-front-kit/src/Pages/DocumentDetails/DocumentDetails.tsx new file mode 100644 index 00000000..e15c0011 --- /dev/null +++ b/packages/react-front-kit/src/Pages/DocumentDetails/DocumentDetails.tsx @@ -0,0 +1,240 @@ +'use client'; + +import type { ReactElement, ReactNode } from 'react'; + +import { + Button, + Card, + Checkbox, + Chip, + Divider, + Grid, + Group, + MantineProvider, + Space, + Text, +} from '@mantine/core'; +import { + PencilSimple, + PencilSimpleLine, + Plus, + ShareNetwork, + TrashSimple, +} from '@phosphor-icons/react'; +import { FolderMove, primaryTheme } from '@smile/react-front-kit-shared'; + +const theme = primaryTheme; + +theme.colorScheme = 'dark'; + +export interface IDocumentDetailsProps { + children?: ReactNode; +} + +export function DocumentDetails(props: IDocumentDetailsProps): ReactElement { + const { children } = props; + return ( +
+ + + + Générales + + + + + + + + + + + + + Métadonnées + + + + + + + + + + + Accés au document + + + + + + + + + + + + + Native + + + + + + Créer + + + + 22 mai 2021 + + + + + + + + Dernière modification + + + + 22 mai 2021 + + + + + + + + Créer par + + + + 22 mai 2021 + + + + + + + + Modifier par + + + + 22 mai 2021 + + + + + + + + Version + + + + V2 + + + + + + + + + Identité + + + + + + Titre + + + + 22 mai 2021 + + + + + + + + Description + + + + 22 mai 2021 + + + + + + + + Type de document + + + + 22 mai 2021 + + + + + + + + + Titre + + + + Facture_Medor + + + + + + + + Description + + + + - + + + + + + + + Type de document + + + + Facture + + + + + + + {children} +
+ ); +} diff --git a/packages/react-front-kit/src/index.tsx b/packages/react-front-kit/src/index.tsx index 924f643e..f5618032 100644 --- a/packages/react-front-kit/src/index.tsx +++ b/packages/react-front-kit/src/index.tsx @@ -16,3 +16,4 @@ export * from './Components/SidebarMenu/SidebarMenu'; export * from './Layouts/FoldableColumnLayout/FoldableColumnLayout'; // page exports export * from './Pages/TestPage/TestPage'; +export * from './Pages/DocumentDetails/DocumentDetails';