-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(redmine 1258408): added DocumentView to DocumentDetails page
- Loading branch information
Quentin Le Caignec
committed
Oct 20, 2023
1 parent
48189c8
commit 4f1d0f7
Showing
4 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@smile/react-front-kit': minor | ||
--- | ||
|
||
Added `DocumentView` iframe to `DocumentDetails` example page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/react-front-kit/src/Pages/DocumentDetails/DocumentView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { ReactElement } from 'react'; | ||
|
||
interface IDocumentViewProps { | ||
title?: string; | ||
url: string; | ||
} | ||
|
||
export function DocumentView(props: IDocumentViewProps): ReactElement { | ||
const { title = 'document', url } = props; | ||
|
||
// eslint-disable-next-line react/iframe-missing-sandbox | ||
return <iframe height="100%" src={url} title={title} width="100%" />; | ||
} |
Binary file not shown.