@unitedstatespowersquadrons/components 1.2.33 → 1.2.35
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/Colors.tsx +9 -0
- package/Pagination.tsx +5 -3
- package/package.json +1 -1
package/Colors.tsx
CHANGED
|
@@ -87,6 +87,15 @@ const specificColors = {
|
|
|
87
87
|
highlighted: "#EEFFFF",
|
|
88
88
|
selected: "#99FFFF",
|
|
89
89
|
},
|
|
90
|
+
background: {
|
|
91
|
+
blue: "#CCEEFF",
|
|
92
|
+
darkGray: shades._c,
|
|
93
|
+
gray: shades._e,
|
|
94
|
+
green: "#EEFFEE",
|
|
95
|
+
orange: "#FFEECC",
|
|
96
|
+
purple: "#EECCFF",
|
|
97
|
+
red: "#FFEEEE",
|
|
98
|
+
},
|
|
90
99
|
button: {
|
|
91
100
|
background: {
|
|
92
101
|
hover: {
|
package/Pagination.tsx
CHANGED
|
@@ -29,15 +29,17 @@ interface Props {
|
|
|
29
29
|
maxPage: number;
|
|
30
30
|
pageNumber: number;
|
|
31
31
|
path: string;
|
|
32
|
+
params?: Record<string, string | number>;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
const Pagination = (props: Props) => {
|
|
35
|
-
const { label, maxPage, pageNumber, path } = props;
|
|
36
|
+
const { label, maxPage, pageNumber, params, path } = props;
|
|
36
37
|
const classes = useStyles();
|
|
37
38
|
|
|
38
39
|
const button = (number: number, icon: string, title: string) => {
|
|
39
|
-
const
|
|
40
|
-
|
|
40
|
+
const queryString = new URLSearchParams({ ...params, page: JSON.stringify(number) }).toString();
|
|
41
|
+
const href = [path, queryString].join("?");
|
|
42
|
+
return <IconButton href={href} icon={icon} title={title} />;
|
|
41
43
|
};
|
|
42
44
|
|
|
43
45
|
const spacer = <span className={classes.spacer} />;
|