UNPKG

@iobroker/adapter-react

Version:

React classes to develop admin interfaces for ioBroker with react.

71 lines (70 loc) 2.01 kB
export namespace EXTENSIONS { const images: string[]; const code: string[]; const txt: string[]; } export default _export; export type FileViewerProps = { /** * The key to identify this component. */ key?: string; /** * Translation function */ t: import('../types').Translator; /** * The selected language. */ lang?: ioBroker.Languages; /** * Is expert mode enabled? (default: false) */ expertMode?: boolean; /** * Callback when the viewer is closed. */ onClose: () => void; /** * The URL to the file to be displayed. */ href: string; }; /** @type {typeof FileViewer} */ declare const _export: typeof FileViewer; /** * @typedef {object} FileViewerProps * @property {string} [key] The key to identify this component. * @property {import('../types').Translator} t Translation function * @property {ioBroker.Languages} [lang] The selected language. * @property {boolean} [expertMode] Is expert mode enabled? (default: false) * @property {() => void} onClose Callback when the viewer is closed. * @property {string} href The URL to the file to be displayed. * * @extends {React.Component<FileViewerProps>} */ declare class FileViewer extends React.Component<FileViewerProps, any, any> { static getDerivedStateFromProps(): void; /** * @param {Readonly<FileViewerProps>} props */ constructor(props: Readonly<FileViewerProps>); ext: string; state: { text: any; code: any; copyPossible: boolean; }; getContent(): JSX.Element; render(): JSX.Element; } declare namespace FileViewer { namespace propTypes { const t: PropTypes.Requireable<(...args: any[]) => any>; const onClose: PropTypes.Requireable<(...args: any[]) => any>; const href: PropTypes.Validator<string>; const fullScreen: PropTypes.Requireable<boolean>; } } import React from "react"; import PropTypes from "prop-types";