@unitedstatespowersquadrons/components 1.4.12 → 1.4.14-1
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/Badges/Maintainer.tsx +26 -0
- package/Badges/Reachable.tsx +1 -1
- package/Badges/index.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { github, shields } from "./remotes";
|
|
3
|
+
import { badgeify } from "./helpers";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
color?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
repo: string;
|
|
9
|
+
username: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const MaintainerBadge = (props: Props) => {
|
|
13
|
+
const { color, name, repo, username } = props;
|
|
14
|
+
|
|
15
|
+
const label = repo || "maintainer";
|
|
16
|
+
const displayName = badgeify(name)!;
|
|
17
|
+
const displayColor = color || "blue";
|
|
18
|
+
|
|
19
|
+
return(
|
|
20
|
+
<a href={`${github}/${username}`} rel="noreferrer" target="_blank">
|
|
21
|
+
<img src={`${shields}/badge/${label}-${displayName}-${displayColor}?logo=github&logoColor=white`} />
|
|
22
|
+
</a>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default MaintainerBadge;
|
package/Badges/Reachable.tsx
CHANGED
package/Badges/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ import Endpoint from "./Endpoint";
|
|
|
8
8
|
import Gem from "./Gem";
|
|
9
9
|
import Json from "./Json";
|
|
10
10
|
import LiveDate from "./LiveDate";
|
|
11
|
+
import Maintainer from "./Maintainer";
|
|
11
12
|
import Npm from "./Npm";
|
|
12
13
|
import PhpLibrary from "./PhpLibrary";
|
|
13
14
|
import Reachable from "./Reachable";
|
|
@@ -24,6 +25,7 @@ export { default as EndpointBadge } from "./Endpoint";
|
|
|
24
25
|
export { default as GemBadge } from "./Gem";
|
|
25
26
|
export { default as JsonBadge } from "./Json";
|
|
26
27
|
export { default as LiveDateBadge } from "./LiveDate";
|
|
28
|
+
export { default as MaintainerBadge } from "./Maintainer";
|
|
27
29
|
export { default as NpmBadge } from "./Npm";
|
|
28
30
|
export { default as PhpLibraryBadge } from "./PhpLibrary";
|
|
29
31
|
export { default as ReachableBadge } from "./Reachable";
|
|
@@ -46,6 +48,7 @@ export default {
|
|
|
46
48
|
Gem,
|
|
47
49
|
Json,
|
|
48
50
|
LiveDate,
|
|
51
|
+
Maintainer,
|
|
49
52
|
Npm,
|
|
50
53
|
PhpLibrary,
|
|
51
54
|
Reachable,
|