soccer-jersey-fork 1.0.105 → 1.0.107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,8 +28,8 @@ export const Default = {
28
28
  y: 45,
29
29
  color: "#fff",
30
30
  fontFamily: "Impact",
31
- weight: 900,
32
- style: "normal",
31
+ fontWeight: 400,
32
+ fontStyle: "normal",
33
33
  },
34
34
  ],
35
35
  shortsColor: "#DA000C",
@@ -29,8 +29,8 @@ export interface DrawSoccerJerseyProps {
29
29
  backgroundColor?: string;
30
30
  backgroundShape?: "ellipse" | "square";
31
31
  fontFamily: string;
32
- weight?: number;
33
- style?: CSSProperties["fontStyle"];
32
+ fontWeight?: number;
33
+ fontStyle?: CSSProperties["fontStyle"];
34
34
  }[];
35
35
  images: {
36
36
  src: string;
@@ -150,7 +150,7 @@ export default function drawSoccerJersey({ shirtColor = "plain", shirtStyle, shi
150
150
  */
151
151
  if (texts && texts.length > 0) {
152
152
  for (const textItem of texts) {
153
- const { text, color, size, outlineColor, backgroundColor, backgroundShape, fontFamily = "Impact", style, weight, x, y, } = textItem;
153
+ const { text, color, size, outlineColor, backgroundColor, backgroundShape, fontFamily = "Impact", fontWeight, fontStyle, x, y, } = textItem;
154
154
  const drawText = (elem) => {
155
155
  return elem
156
156
  .text(text)
@@ -158,8 +158,8 @@ export default function drawSoccerJersey({ shirtColor = "plain", shirtStyle, shi
158
158
  .font({
159
159
  family: fontFamily,
160
160
  size,
161
- style,
162
- weight,
161
+ weight: fontWeight,
162
+ style: fontStyle,
163
163
  anchor: "middle",
164
164
  })
165
165
  .stroke({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soccer-jersey-fork",
3
- "version": "1.0.105",
3
+ "version": "1.0.107",
4
4
  "description": "Generate soccer jerseys in SVG format",
5
5
  "main": "lib/index.js",
6
6
  "author": "nadchif (https://github.com/nadchif)",