@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.
- package/lib/shared/shape.d.ts +1 -1
- package/lib/shared/shape.js +5 -5
- package/package.json +4 -3
- package/src/shared/shape.tsx +6 -6
package/lib/shared/shape.d.ts
CHANGED
package/lib/shared/shape.js
CHANGED
|
@@ -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.
|
|
10
|
-
? props.
|
|
11
|
-
: props.
|
|
12
|
-
? `linear-gradient(${props.
|
|
13
|
-
: `radial-gradient(circle, ${props.
|
|
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.
|
|
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
|
-
"
|
|
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
|
}
|
package/src/shared/shape.tsx
CHANGED
|
@@ -13,7 +13,7 @@ export interface IStroke {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface IShape {
|
|
16
|
-
|
|
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.
|
|
26
|
-
? props.
|
|
27
|
-
: props.
|
|
28
|
-
? `linear-gradient(${props.
|
|
29
|
-
: `radial-gradient(circle, ${props.
|
|
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 &&
|