@equinor/fusion-framework-cli
Version:
--- title: Fusion Framework CLI ---
12 lines • 1.08 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { tag } from '@equinor/eds-icons';
import { Button, Icon, TopBar } from '@equinor/eds-core-react';
import PersonAvatarElement from '@equinor/fusion-wc-person/avatar';
PersonAvatarElement;
import { useBookmarkComponentContext } from '@equinor/fusion-framework-react-components-bookmark';
export const HeaderActions = (props) => {
const { toggleBookmark, togglePerson, userAzureId } = props;
const bookmarkContext = useBookmarkComponentContext();
return (_jsxs(TopBar.Actions, { style: { minWidth: 48, minHeight: 48 }, children: [_jsx(Button, { onClick: () => toggleBookmark((x) => !x), variant: "ghost_icon", disabled: !bookmarkContext.provider, title: bookmarkContext.provider ? 'Bookmarks' : 'Bookmarks not available, enable in app', children: _jsx(Icon, { data: tag }) }), _jsx(Button, { onClick: () => togglePerson((x) => !x), variant: "ghost_icon", children: _jsx("fwc-person-avatar", { size: "small", azureId: userAzureId, clickable: false }) })] }));
};
//# sourceMappingURL=Header.Actions.js.map