How to use the @sketch-hq/sketch-file-format-ts.FileFormat1.MarkerType function in @sketch-hq/sketch-file-format-ts

To help you get started, we’ve selected a few @sketch-hq/sketch-file-format-ts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github airbnb / react-sketchapp / src / jsonUtils / style.ts View on Github external
export const makeStyle = (
  style?: ViewStyle | TextStyle,
  fills?: FileFormat.Fill[],
  shadowsProp?: ViewStyle[],
): FileFormat.Style => {
  const json: FileFormat.Style = {
    _class: 'style',
    fills: [],
    miterLimit: 10,
    innerShadows: [],
    shadows: [],
    borderOptions: makeBorderOptions('solid', 0, 0, 0),
    startMarkerType: FileFormat.MarkerType.OpenArrow,
    endMarkerType: FileFormat.MarkerType.OpenArrow,
    windingRule: FileFormat.WindingRule.EvenOdd,
    colorControls: {
      _class: 'colorControls',
      isEnabled: false,
      brightness: 1,
      contrast: 1,
      hue: 1,
      saturation: 1,
    },
  };

  if (fills && fills.length) {
    json.fills = json.fills.concat(fills);
  }
github airbnb / react-sketchapp / src / jsonUtils / style.ts View on Github external
export const makeStyle = (
  style?: ViewStyle | TextStyle,
  fills?: FileFormat.Fill[],
  shadowsProp?: ViewStyle[],
): FileFormat.Style => {
  const json: FileFormat.Style = {
    _class: 'style',
    fills: [],
    miterLimit: 10,
    innerShadows: [],
    shadows: [],
    borderOptions: makeBorderOptions('solid', 0, 0, 0),
    startMarkerType: FileFormat.MarkerType.OpenArrow,
    endMarkerType: FileFormat.MarkerType.OpenArrow,
    windingRule: FileFormat.WindingRule.EvenOdd,
    colorControls: {
      _class: 'colorControls',
      isEnabled: false,
      brightness: 1,
      contrast: 1,
      hue: 1,
      saturation: 1,
    },
  };

  if (fills && fills.length) {
    json.fills = json.fills.concat(fills);
  }

  if (!style) {