@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 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 joiner = path.includes("?") ? "&" : "?";
40
- return <IconButton href={`${path}${joiner}page=${number}`} icon={icon} title={title} />;
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} />;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unitedstatespowersquadrons/components",
3
- "version": "1.2.33",
3
+ "version": "1.2.35",
4
4
  "description": "USPS shared React components library",
5
5
  "main": "index.tsx",
6
6
  "scripts": {