gitlab-org--gitlab-foss/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

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,
};
};