FileViewerField

Render PDF or Image files in material ui Dialog

Usage

import { FileViewerField } from '@ra-libs/react';

<FileViewerField source="<source>" typeSource="mimeType" title="fileTitle" useLabel />;

it renders a button with the file title name

Props

Prop
Required
Type
Default
Description

useLabel

false

boolean

false

whether to use react-admin Labeled component or not.

typeSource

false

string

-

the file mimeType source to find in record. if ommitted the component will render the default react-admin FileField component.

title

false

string

file

the file title/name.

Last updated