UNPKG

@gravity-ui/uikit

Version:

Gravity UI base styling and components

16 lines (15 loc) 1.19 kB
'use client'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Xmark } from '@gravity-ui/icons'; import { Button } from "../Button/index.js"; import { Icon } from "../Icon/index.js"; import { Text } from "../Text/index.js"; import { block } from "../utils/cn.js"; import { CollapseActions } from "./components/CollapseActions.js"; import i18n from "./i18n/index.js"; import "./ActionsPanel.css"; const b = block('actions-panel'); export const ActionsPanel = ({ className, actions, onClose, renderNote, noteClassName, qa, maxRowActions, }) => { return (_jsxs("div", { className: b(null, className), "data-qa": qa, children: [typeof renderNote === 'function' && (_jsx(Text, { className: b('note-wrapper', noteClassName), as: "div", color: "light-primary", variant: "subheader-2", ellipsis: true, children: renderNote() })), _jsx(CollapseActions, { actions: actions, maxRowActions: maxRowActions }), typeof onClose === 'function' && (_jsx(Button, { view: "flat-contrast", size: "m", onClick: onClose, className: b('button-close'), "aria-label": i18n('label_close'), children: _jsx(Icon, { data: Xmark }, "icon") }))] })); }; //# sourceMappingURL=ActionsPanel.js.map