react-terminal-viewer
Version:
<h1 align="center"> react-terminal-viewer </h1>
34 lines • 1.79 kB
JavaScript
import React from 'react';
import { FullscreenOutlined, FullscreenExitOutlined, VerticalAlignTopOutlined, VerticalAlignBottomOutlined } from '@ant-design/icons';
import "./index.less";
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
var TerminalViewerToolBar = function TerminalViewerToolBar(_ref) {
var className = _ref.className,
style = _ref.style,
icons = _ref.icons,
fullScreen = _ref.fullScreen,
_ref$showFullScreen = _ref.showFullScreen,
showFullScreen = _ref$showFullScreen === void 0 ? true : _ref$showFullScreen,
onScrollTop = _ref.onScrollTop,
onScrollBottom = _ref.onScrollBottom,
onFullScreen = _ref.onFullScreen;
return /*#__PURE__*/_jsxs("div", {
className: ['terminal-viewer-toolbar', className].filter(Boolean).join(' '),
style: style,
children: [/*#__PURE__*/_jsx("div", {
className: "terminal-viewer-toolbar-button",
onClick: onScrollTop,
children: (icons === null || icons === void 0 ? void 0 : icons.top) || /*#__PURE__*/_jsx(VerticalAlignTopOutlined, {})
}), /*#__PURE__*/_jsx("div", {
className: "terminal-viewer-toolbar-button",
onClick: onScrollBottom,
children: (icons === null || icons === void 0 ? void 0 : icons.bottom) || /*#__PURE__*/_jsx(VerticalAlignBottomOutlined, {})
}), showFullScreen && /*#__PURE__*/_jsx("div", {
className: "terminal-viewer-toolbar-button",
onClick: onFullScreen,
children: fullScreen ? (icons === null || icons === void 0 ? void 0 : icons.fullScreenExit) || /*#__PURE__*/_jsx(FullscreenExitOutlined, {}) : (icons === null || icons === void 0 ? void 0 : icons.fullScreen) || /*#__PURE__*/_jsx(FullscreenOutlined, {})
})]
});
};
export default TerminalViewerToolBar;