@fleetbase/ember-ui
Version:
Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.
15 lines (12 loc) • 388 B
JavaScript
import Component from '@glimmer/component';
import { action } from '@ember/object';
export default class ModalTitleWithButtonsComponent extends Component {
handler(option, dd) {
if (typeof dd?.actions?.close === 'function') {
dd.actions.close();
}
if (typeof option.action === 'function') {
option.action();
}
}
}