Files
bim_engine/src/components/button-group/toolbar/buttons/info/index.ts

22 lines
723 B
TypeScript
Raw Normal View History

2025-12-24 19:02:34 +08:00
import type { ButtonConfig } from '../../../index.type';
import type { BimEngine } from '../../../../../bim-engine';
2025-12-22 15:39:58 +08:00
import { infoIcon } from './icon';
2025-12-24 19:02:34 +08:00
/**
*
* demo engine 便 SDK
*/
export const createInfoButton = (_engine: BimEngine): ButtonConfig => {
return {
id: 'toolbar-info',
groupId: 'group-2',
type: 'button',
label: 'toolbar.info',
icon: infoIcon,
onClick: () => {
// WORKAROUND: Dispatch a standard custom event on document
document.dispatchEvent(new CustomEvent('bim-demo:open-property-panel'));
}
};
};