@bprotsyk/aso-core 1.2.21 → 1.2.24

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.
@@ -9,7 +9,7 @@ export interface IStroke {
9
9
  color: string;
10
10
  }
11
11
  export interface IShape {
12
- backgroundColor: IGradient | string;
12
+ fill: IGradient | string;
13
13
  stroke?: IStroke;
14
14
  textColor?: string;
15
15
  fontUrl?: string;
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ShapeDiv = void 0;
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
8
  exports.ShapeDiv = styled_components_1.default.div `
9
- background: ${props => typeof props.backgroundColor === 'string'
10
- ? props.backgroundColor
11
- : props.backgroundColor.angle
12
- ? `linear-gradient(${props.backgroundColor.angle}deg, ${props.backgroundColor.startColor} 0%, ${props.backgroundColor.centerColor || props.backgroundColor.startColor} 50%, ${props.backgroundColor.endColor} 100%)`
13
- : `radial-gradient(circle, ${props.backgroundColor.startColor} 0%, ${props.backgroundColor.endColor} 100%)`};
9
+ background: ${props => typeof props.fill === 'string'
10
+ ? props.fill
11
+ : props.fill.angle
12
+ ? `linear-gradient(${props.fill.angle}deg, ${props.fill.startColor} 0%, ${props.fill.centerColor || props.fill.startColor} 50%, ${props.fill.endColor} 100%)`
13
+ : `radial-gradient(circle, ${props.fill.startColor} 0%, ${props.fill.endColor} 100%)`};
14
14
 
15
15
  ${props => props.stroke &&
16
16
  `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bprotsyk/aso-core",
3
- "version": "1.2.21",
3
+ "version": "1.2.24",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {
@@ -24,10 +24,11 @@
24
24
  "@types/mongoose": "^5.11.97",
25
25
  "module-alias": "^2.2.2",
26
26
  "mongoose": "^6.8.3",
27
- "styled-components": "^5.3.9"
27
+ "react": "^18.2.0",
28
+ "styled-components": "^5.3.9",
29
+ "@types/styled-components": "^5.1.26"
28
30
  },
29
31
  "devDependencies": {
30
- "@types/styled-components": "^5.1.26",
31
32
  "typescript": "^4.8.0-dev.20220623"
32
33
  }
33
34
  }
@@ -13,7 +13,7 @@ export interface IStroke {
13
13
  }
14
14
 
15
15
  export interface IShape {
16
- backgroundColor: IGradient | string;
16
+ fill: IGradient | string;
17
17
  stroke?: IStroke;
18
18
  textColor?: string;
19
19
  fontUrl?: string;
@@ -22,11 +22,11 @@ export interface IShape {
22
22
 
23
23
  export const ShapeDiv = styled.div<IShape>`
24
24
  background: ${props =>
25
- typeof props.backgroundColor === 'string'
26
- ? props.backgroundColor
27
- : props.backgroundColor.angle
28
- ? `linear-gradient(${props.backgroundColor.angle}deg, ${props.backgroundColor.startColor} 0%, ${props.backgroundColor.centerColor || props.backgroundColor.startColor} 50%, ${props.backgroundColor.endColor} 100%)`
29
- : `radial-gradient(circle, ${props.backgroundColor.startColor} 0%, ${props.backgroundColor.endColor} 100%)`};
25
+ typeof props.fill === 'string'
26
+ ? props.fill
27
+ : props.fill.angle
28
+ ? `linear-gradient(${props.fill.angle}deg, ${props.fill.startColor} 0%, ${props.fill.centerColor || props.fill.startColor} 50%, ${props.fill.endColor} 100%)`
29
+ : `radial-gradient(circle, ${props.fill.startColor} 0%, ${props.fill.endColor} 100%)`};
30
30
 
31
31
  ${props =>
32
32
  props.stroke &&