-
Notifications
You must be signed in to change notification settings - Fork 43
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 #1035 from lkiesow/header
Make Studio and Editor look alike
- Loading branch information
Showing
5 changed files
with
132 additions
and
3 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,32 @@ | ||
import React from 'react'; | ||
|
||
import { useSelector } from "react-redux" | ||
import { selectThemeState } from "../redux/themeSlice" | ||
import { css } from '@emotion/react' | ||
|
||
function Header() { | ||
const themeState = useSelector(selectThemeState); | ||
|
||
const header = themeState.startsWith('high-contrast-') | ||
? css({ | ||
height: '46px', | ||
backgroundColor: '#000', | ||
borderBottom: '2px solid white' | ||
}) | ||
: css({ | ||
height: '48px', | ||
backgroundColor: '#333333', | ||
}) | ||
|
||
const logo = css({ | ||
height: '48px', | ||
}) | ||
|
||
return ( | ||
<div css={header}> | ||
<img src="opencast-editor.svg" css={logo} alt="Opencast Editor" /> | ||
</div> | ||
); | ||
} | ||
|
||
export default Header; |
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