-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include legacy settings for visability (#474)
- Loading branch information
Showing
4 changed files
with
203 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from "react"; | ||
import { Divider, HTMLTable } from "@blueprintjs/core"; | ||
import { get } from "../settings"; | ||
import { FEATURES } from ".."; | ||
|
||
const LegacySettings = ({ moduleId }: { moduleId: string }) => { | ||
const featureSettings = FEATURES.find((f) => f.id === moduleId)?.settings; | ||
if (!featureSettings) return <>No Settings For {moduleId}</>; | ||
|
||
const docs = FEATURES.find((f) => f.id === moduleId)?.docs; | ||
|
||
return ( | ||
<div className="mx-auto"> | ||
<HTMLTable bordered={false}> | ||
{Object.entries(featureSettings).map(([key, value]) => { | ||
const setting = get(value) || "Not Set"; | ||
return ( | ||
<tr> | ||
<td>{key}</td> | ||
<td>{setting}</td> | ||
</tr> | ||
); | ||
})} | ||
</HTMLTable> | ||
<Divider /> | ||
{docs && ( | ||
<div className="text-center"> | ||
<a | ||
href={`https://github.com/RoamJs/workbench/blob/main/docs/${docs}`} | ||
> | ||
Documentation | ||
</a> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default LegacySettings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.