@wener/console
Version:
Base console UI toolkit
28 lines (27 loc) • 1.49 kB
JavaScript
import React from "react";
import { CgExpand } from "react-icons/cg";
import { HiMiniMinus, HiMiniXMark } from "react-icons/hi2";
import { clsx } from "clsx";
import { getWindowDragCancelClassname } from "../const.js";
import styles from "./macOS.module.css";
export const MacOSWindowController = ({ close, minimize, maximize }) => {
return /*#__PURE__*/ React.createElement("div", {
className: clsx(`${getWindowDragCancelClassname()} group/actions`, styles.WindowController)
}, /*#__PURE__*/ React.createElement("button", {
type: "button",
"data-action": "close",
...close,
className: clsx("group-focus-within/window:bg-[var(--color)] group-hover/actions:bg-[var(--color)]", close?.className)
}, /*#__PURE__*/ React.createElement(HiMiniXMark, null)), /*#__PURE__*/ React.createElement("button", {
type: "button",
"data-action": "minimize",
...minimize,
className: clsx("group-focus-within/window:bg-[var(--color)] group-hover/actions:bg-[var(--color)]", minimize?.className)
}, /*#__PURE__*/ React.createElement(HiMiniMinus, null)), /*#__PURE__*/ React.createElement("button", {
type: "button",
"data-action": "maximize",
...maximize,
className: clsx("group-focus-within/window:bg-[var(--color)] group-hover/actions:bg-[var(--color)]", maximize?.className)
}, /*#__PURE__*/ React.createElement(CgExpand, null)));
};
//# sourceMappingURL=MacOSWindowController.js.map