-
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.
add reactive search bar, deployment action
- Loading branch information
Showing
15 changed files
with
211 additions
and
38 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,32 @@ | ||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | ||
|
||
name: Node.js Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- run: yarn | ||
|
||
publish-npm: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: yarn | ||
- run: yarn publish --non-interactive | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |
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
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,50 @@ | ||
/** | ||
* OptionsMenuItem.tsx: a PsychSCREEN app bar menu item with a hamburger icon and a pop-out sub menu for options. | ||
*/ | ||
|
||
import React, { useState } from 'react'; | ||
import { ClickAwayListener, Grow, MenuList, Popper } from '@mui/material'; | ||
import MenuIcon from '@mui/icons-material/Menu'; | ||
|
||
import { DropDownMenu } from '../DropDownMenu'; | ||
import { MenuItemProps } from './DropDownMenuItem'; | ||
|
||
const OptionsMenuItem: React.FC<MenuItemProps> = props => { | ||
const anchorRef = React.useRef<HTMLDivElement>(null); | ||
const [ open, setOpen ] = useState(false); | ||
return ( | ||
<> | ||
<div ref={anchorRef}> | ||
<MenuIcon | ||
style={{ marginRight: props.flexGrow ? "0px" : props.marginRight, marginTop: "-3px", cursor: "pointer" }} | ||
onClick={() => setOpen(true)} | ||
/> | ||
</div> | ||
{ anchorRef.current && ( | ||
<Popper | ||
anchorEl={anchorRef.current} | ||
open={open} | ||
placement="bottom-start" | ||
transition | ||
disablePortal | ||
> | ||
{ ({ TransitionProps, placement }) => ( | ||
<Grow | ||
{...TransitionProps} | ||
style={{ transformOrigin: placement === 'bottom-start' ? 'left top' : 'left bottom' }} | ||
> | ||
<DropDownMenu style={{ width: "150px" }}> | ||
<ClickAwayListener onClickAway={() => setOpen(false)}> | ||
<MenuList style={{ textAlign: "center" }}> | ||
{props.menu} | ||
</MenuList> | ||
</ClickAwayListener> | ||
</DropDownMenu> | ||
</Grow> | ||
)} | ||
</Popper> | ||
)} | ||
</> | ||
); | ||
} | ||
export default OptionsMenuItem; |
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,41 @@ | ||
/** | ||
* TabletAppBar.tsx: PsychSCREEN app bar for tablets and mobile devices. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { AppBarProps, StyledAppBar, PortalsMenuItem as OptionsMenuItem } from './AppBar'; | ||
import { Box, Toolbar } from '@mui/material'; | ||
|
||
import MenuItem from './MenuItem'; | ||
import OptionsMenu from './OptionsMenuItem'; | ||
|
||
export type TabletAppBarProps = AppBarProps & { title?: string }; | ||
|
||
const PortalsMenu: React.FC<{ onItemClicked?: (index: number) => void }> = ({ onItemClicked }) => ( | ||
<> | ||
<OptionsMenuItem onClick={() => onItemClicked && onItemClicked(-1)}>About</OptionsMenuItem> | ||
<OptionsMenuItem onClick={() => onItemClicked && onItemClicked(0)}>Disease/Trait Portal</OptionsMenuItem> | ||
<OptionsMenuItem onClick={() => onItemClicked && onItemClicked(1)}>Gene/bCRE Portal</OptionsMenuItem> | ||
<OptionsMenuItem onClick={() => onItemClicked && onItemClicked(2)}>SNP/QTL Portal</OptionsMenuItem> | ||
<OptionsMenuItem onClick={() => onItemClicked && onItemClicked(3)}>Single-Cell Portal</OptionsMenuItem> | ||
</> | ||
); | ||
|
||
const TabletAppBar: React.FC<TabletAppBarProps> = props => ( | ||
<Box sx={{ flexGrow: 1 }}> | ||
<StyledAppBar position="static" elevation={0}> | ||
<Toolbar style={{ paddingLeft: "19px" }}> | ||
<OptionsMenu | ||
marginRight="32px" | ||
menu={<PortalsMenu onItemClicked={props.onPortalClicked} />} | ||
> | ||
Portals | ||
</OptionsMenu> | ||
<MenuItem flexGrow={1} textAlign="center" fontSize="22px" lineHeight="28px" fontWeight={400}> | ||
{ props.title || "" } | ||
</MenuItem> | ||
</Toolbar> | ||
</StyledAppBar> | ||
</Box> | ||
); | ||
export default TabletAppBar; |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
import AppBar, { AppBarProps } from './AppBar'; | ||
export { AppBar, AppBarProps }; | ||
import TabletAppBar, { TabletAppBarProps } from './TabletAppBar'; | ||
export { AppBar, AppBarProps, TabletAppBar, TabletAppBarProps }; |
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
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
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.