Files
frontend-app-learning/src/courseware/course/sidebar/common/TriggerBase.jsx
Awais Ansari 0664dc38d9 feat: decouple notifications panel using widget registry mechanism (#1885)
Removes the tightly coupled upgrade/upsell ("notifications") panel from the Learning MFE core and replaces it with a pluggable widget registry system. The right sidebar now supports dynamically-registered external widgets, making it easy to add, remove, or replace sidebar panels without forking the MFE.
2026-04-08 20:03:55 -03:00

28 lines
660 B
JavaScript

import PropTypes from 'prop-types';
import React from 'react';
const SidebarTriggerBase = ({
onClick,
ariaLabel,
children,
}) => (
<button
className="border border-light-400 bg-transparent align-items-center align-content-center d-flex sidebar-trigger-btn"
type="button"
onClick={onClick}
aria-label={ariaLabel}
>
<div className="icon-container d-flex position-relative align-items-center">
{children}
</div>
</button>
);
SidebarTriggerBase.propTypes = {
onClick: PropTypes.func.isRequired,
ariaLabel: PropTypes.string.isRequired,
children: PropTypes.element.isRequired,
};
export default SidebarTriggerBase;