@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
13 lines (12 loc) • 557 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { isAdaptableSystemIcon } from '../../../components/Icon';
import SimpleButton from '../../../components/SimpleButton';
import { useAdaptable } from '../../AdaptableContext';
export const AdaptableButtonComponent = (props) => {
let icon = props.icon;
const adaptable = useAdaptable();
if (adaptable && isAdaptableSystemIcon(icon)) {
icon = adaptable.api?.userInterfaceApi.internalApi.prepareAdaptableIconDef(icon);
}
return _jsx(SimpleButton, { ...props, icon: icon });
};