qlik-oss/sn-org-chart

View on GitHub
src/extension/styling-definitions/styling-utils.js

Summary

Maintainability
A
1 hr
Test Coverage
function labelStylingDefinition(path, fontResolver) {
  const pathFontFamily = `${path}.fontFamily`;
  const pathFontSize = `${path}.fontSize`;

  return {
    fontFamilyItem: {
      component: "dropdown",
      ref: pathFontFamily,
      options: () => fontResolver.getOptions(pathFontFamily),
      defaultValue: () => fontResolver.getDefaultValue(pathFontFamily),
    },
    fontSizeItem: {
      component: "dropdown",
      ref: pathFontSize,
      options: () => fontResolver.getOptions(pathFontSize),
      defaultValue: () => fontResolver.getDefaultValue(pathFontSize),
    },
  };
}

export default labelStylingDefinition;