debian-mirror-gitlab/spec/frontend/editor/components/helpers.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
364 B
JavaScript
Raw Normal View History

2022-06-21 17:19:12 +05:30
import { EDITOR_TOOLBAR_RIGHT_GROUP } from '~/editor/constants';
export const buildButton = (id = 'foo-bar-btn', options = {}) => {
return {
__typename: 'Item',
id,
label: options.label || 'Foo Bar Button',
icon: options.icon || 'foo-bar',
selected: options.selected || false,
group: options.group || EDITOR_TOOLBAR_RIGHT_GROUP,
};
};