Skip to content
Snippets Groups Projects
Commit 0837d0d8 authored by chris's avatar chris
Browse files

change between projects

parent 56af1414
No related branches found
No related tags found
1 merge request!289Pm node views portals
import React from 'react';
import React, { useState } from 'react';
import styled from 'styled-components';
import { createGlobalStyle } from 'styled-components';
import Editoria from './Editoria/Editoria';
import HHMI from './HHMI/HHMI';
const GlobalStyle = createGlobalStyle`
body {
margin: 0;
......@@ -15,11 +18,54 @@ const GlobalStyle = createGlobalStyle`
}
`;
const ChooseProject = styled.div`
display: flex;
flex-direction: row;
align-items: center;
height: 50px;
span {
margin-right: 20px;
}
`;
const Projects = styled.div`
margin-left: 10px;
`;
const ProjectButton = styled.button`
cursor: pointer;
margin-right: 20px;
`;
const Editors = () => {
const [project, setProject] = useState('editoria');
const displayProject = () => {
switch (project) {
case 'hhmi':
return <HHMI />;
case 'ncbi':
break;
default:
return <Editoria />;
}
};
return (
<>
<GlobalStyle />
<Editoria />
<ChooseProject>
<Projects>
<span>Select Project:</span>
<ProjectButton onClick={() => setProject('editoria')}>
Editoria
</ProjectButton>
<ProjectButton onClick={() => setProject('hhmi')}>HHMI</ProjectButton>
{/* <ProjectButton onClick={() => setProject('ncbi')}>NCBI</ProjectButton> */}
</Projects>
</ChooseProject>
{displayProject()}
</>
);
};
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment