Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}
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) {