aprog 1.5.1 → 1.5.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Paginate.js +16 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aprog",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Допоміжна бібліотека js",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Paginate.js CHANGED
@@ -3,9 +3,12 @@ import {button, div} from "./aprog.js";
3
3
 
4
4
  export const Paginate = ({ count = 0, currentPage = 1, onPageChange = () => {}, colors = {} } = {}) => {
5
5
  const defaultColors = {
6
- colorDefault: "#043458",
7
- colorBackGround: "#ffffff",
8
- boxShadow: "0 3px 6px 0 rgba(115,73,118, 0.4), 0 3px 6px 0 rgba(115,73,118, 0.39)"
6
+ defaultColor: "#043458",
7
+ backgroundColor: "#ffffff",
8
+ boxShadow: "0 3px 6px 0 rgba(115,73,118, 0.4), 0 3px 6px 0 rgba(115,73,118, 0.39)",
9
+ borderRadius: "0.5rem",
10
+ fontSize: "16px",
11
+ borderWidth: "0.0313rem",
9
12
  };
10
13
 
11
14
  const theme = { ...defaultColors, ...colors };
@@ -26,12 +29,12 @@ export const Paginate = ({ count = 0, currentPage = 1, onPageChange = () => {},
26
29
  .paginate-prev,
27
30
  .paginate-next {
28
31
  padding: 10px 20px;
29
- font-size: 14px;
32
+ font-size: ${theme.fontSize};
30
33
  font-weight: 600;
31
- color: ${theme.colorDefault};
32
- background: ${theme.colorBackGround};
33
- border: 1px solid ${theme.colorDefault};
34
- border-radius: 8px;
34
+ color: ${theme.defaultColor};
35
+ background: ${theme.backgroundColor};
36
+ border: ${theme.borderWidth} solid ${theme.defaultColor};
37
+ border-radius: ${theme.borderRadius};
35
38
  cursor: pointer;
36
39
  box-shadow: ${theme.boxShadow};
37
40
  }
@@ -41,8 +44,8 @@ export const Paginate = ({ count = 0, currentPage = 1, onPageChange = () => {},
41
44
  font-weight: 700;
42
45
  }
43
46
  .paginate-btn.active {
44
- background: ${theme.colorDefault};
45
- color: white;
47
+ background: ${theme.defaultColor};
48
+ color: ${theme.backgroundColor};
46
49
  }
47
50
  .paginate-btn:disabled,
48
51
  .paginate-dots:disabled,
@@ -64,13 +67,13 @@ export const Paginate = ({ count = 0, currentPage = 1, onPageChange = () => {},
64
67
  }
65
68
  .counter span {
66
69
  padding: 8px 16px;
67
- border-radius: 8px);
70
+ border-radius: ${theme.borderRadius};
68
71
  box-shadow: ${theme.boxShadow};
69
72
  cursor: pointer;
70
73
  }
71
74
  .counter span.active {
72
- color: ${theme.colorBackGround};
73
- background-color: ${theme.colorDefault};
75
+ color: ${theme.backgroundColor};
76
+ background-color: ${theme.defaultColor};
74
77
  }
75
78
  </style>
76
79
  `;