generated from paranext/paranext-multi-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
10a7cf2
commit d0facbc
Showing
6 changed files
with
144 additions
and
18 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
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
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,19 @@ | ||
import { WebViewProps } from '@papi/core'; | ||
import { useLocalizedStrings } from '@papi/frontend/react'; | ||
import { LocalizeKey } from 'platform-bible-utils'; | ||
|
||
// misusing the title to pass around the url, because I cannot come up with an easy way to get it in | ||
global.webViewComponent = function LinkWebView({ title }: WebViewProps) { | ||
const descriptionTextL10nKey = '%websiteViewerMenu_clickLink%'; | ||
const localizedStringKeys: LocalizeKey[] = [descriptionTextL10nKey]; | ||
const [{ [descriptionTextL10nKey]: descriptionTextLocalized }] = | ||
useLocalizedStrings(localizedStringKeys); | ||
return ( | ||
<div> | ||
<p>{descriptionTextLocalized}</p> | ||
<a href={title} target="_blank" rel="noreferrer"> | ||
{title} | ||
</a> | ||
</div> | ||
); | ||
}; |
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
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
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