generated from RENCI/react-starter
-
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.
Merge pull request #65 from RENCI/help-about
Adding a help/about tray
- Loading branch information
Showing
7 changed files
with
71 additions
and
12 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,24 @@ | ||
import React, {Fragment} from 'react'; | ||
|
||
/** | ||
* This component renders the help/about try | ||
* | ||
* @returns {JSX.Element} | ||
* @constructor | ||
*/ | ||
export const HelpAboutTray = () => { | ||
// render the form | ||
return ( | ||
<Fragment> | ||
<div>App version: {process.env.REACT_APP_VERSION}</div> | ||
</Fragment> | ||
); | ||
}; | ||
|
||
/** | ||
* this method populates the controls on the form. | ||
* | ||
*/ | ||
// const dataLoader = () => { | ||
// | ||
// }; |
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,17 @@ | ||
import React, { Fragment } from 'react'; | ||
import { HelpAboutTray } from "@help-about/helpAboutTray.js"; | ||
|
||
/** | ||
* component that renders the help/about tray. | ||
* | ||
* @returns {JSX.Element} | ||
* @constructor | ||
*/ | ||
export const HelpAbout = () => { | ||
// render the layer selection component | ||
return ( | ||
<Fragment> | ||
<HelpAboutTray /> | ||
</Fragment> | ||
); | ||
}; |
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,23 @@ | ||
import React from 'react'; | ||
import { Stack } from '@mui/joy'; | ||
import { HelpCenter as HelpAboutIcon} from '@mui/icons-material'; | ||
|
||
// import the component that will allow the user to view things about the app | ||
import { HelpAbout } from "./help_about.js"; | ||
|
||
// get an icon for the tray | ||
export const icon = <HelpAboutIcon />; | ||
|
||
// create a title for this tray element | ||
export const title = 'ADCIRC Help/About'; | ||
|
||
/** | ||
* render the removal component | ||
* | ||
* @returns {JSX.Element} | ||
*/ | ||
export const trayContents = () => ( | ||
<Stack gap={ 2 } p={ 2 }> | ||
<HelpAbout /> | ||
</Stack> | ||
); |
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