Welcome to mirror list, hosted at ThFree Co, Russian Federation.

helpers.js « components « editor « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3e6cd2a236d87d78573441e0825ed23fecaf79dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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,
  };
};