UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

21 lines (20 loc) 648 B
"use client"; import { jsx as _jsx } from "react/jsx-runtime"; import bfClose from "../../assets/bfClose.js"; import Icon from "../Icon/Icon.js"; import useLocale from "../../hooks/useLocale.js"; /* Used by Drawer */ const CloseButton = ({ onClick, ...props })=>{ const locale = useLocale(); return /*#__PURE__*/ _jsx("button", { type: "button", onClick: onClick, className: "bf-close-button", "data-testid": "bf-close-button", "aria-label": locale.closeModal, ...props, children: /*#__PURE__*/ _jsx(Icon, { icon: bfClose }) }); }; export default CloseButton;