@featurevisor/site 1.5.1 → 1.7.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/.eslintcache +1 -1
- package/CHANGELOG.md +11 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/ShowFeature.tsx +30 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@featurevisor/site",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "Static site for Featurevisor",
|
|
5
5
|
"main": "dist",
|
|
6
6
|
"scripts": {
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@featurevisor/types": "^1.3.0"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "331b2cb8a034eb27a7d395d0b6d14eb5ae8ebadf"
|
|
69
69
|
}
|
|
@@ -18,6 +18,35 @@ export function DisplayFeatureOverview() {
|
|
|
18
18
|
|
|
19
19
|
const environmentKeys = Object.keys(feature.environments).sort();
|
|
20
20
|
|
|
21
|
+
const renderBucketBy = (bucketBy) => {
|
|
22
|
+
if (typeof bucketBy === "string") {
|
|
23
|
+
return <span>{bucketBy}</span>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (bucketBy.or) {
|
|
27
|
+
return (
|
|
28
|
+
<ul>
|
|
29
|
+
<li>
|
|
30
|
+
<span className="rounded-full px-2 py-1 text-sm font-bold bg-yellow-300 text-yellow-700">
|
|
31
|
+
or:
|
|
32
|
+
</span>
|
|
33
|
+
{renderBucketBy(bucketBy.or)}
|
|
34
|
+
</li>
|
|
35
|
+
</ul>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<ul className="list-inside list-disc pl-5">
|
|
41
|
+
{bucketBy.map((b) => (
|
|
42
|
+
<li key={b} className="py-1">
|
|
43
|
+
{b}
|
|
44
|
+
</li>
|
|
45
|
+
))}
|
|
46
|
+
</ul>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
21
50
|
return (
|
|
22
51
|
<div className="border-gray-200">
|
|
23
52
|
<dl className="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
|
|
@@ -33,17 +62,7 @@ export function DisplayFeatureOverview() {
|
|
|
33
62
|
</div>
|
|
34
63
|
<div>
|
|
35
64
|
<dt className="text-sm font-medium text-gray-500">Bucket by</dt>
|
|
36
|
-
<dd className="mt-1 text-sm text-gray-900">
|
|
37
|
-
{typeof feature.bucketBy === "string" ? (
|
|
38
|
-
<span>{feature.bucketBy}</span>
|
|
39
|
-
) : (
|
|
40
|
-
<ul>
|
|
41
|
-
{feature.bucketBy.map((b) => (
|
|
42
|
-
<li key={b}>{b}</li>
|
|
43
|
-
))}
|
|
44
|
-
</ul>
|
|
45
|
-
)}
|
|
46
|
-
</dd>
|
|
65
|
+
<dd className="mt-1 text-sm text-gray-900">{renderBucketBy(feature.bucketBy)}</dd>
|
|
47
66
|
</div>
|
|
48
67
|
<div>
|
|
49
68
|
<dt className="text-sm font-medium text-gray-500">Status</dt>
|