Skip to content
Snippets Groups Projects
styled.tsx 2.48 KiB
Newer Older
  • Learn to ignore specific revisions
  • import { AppBar, Button, Drawer, List, ListItem, Toolbar, Typography } from '@material-ui/core'
    
    import styled from 'styled-components'
    
    
    interface ViewButtonProps {
      $activeView: boolean
    }
    
    interface DrawerSizeProps {
    
      $leftDrawerWidth: number | undefined
      $rightDrawerWidth: number | undefined
    
    }
    
    const AppBarHeight = 64
    const SlideListHeight = 60
    
    
    export const ToolBarContainer = styled(Toolbar)`
      display: flex;
      justify-content: space-between;
    
    Albin Henriksson's avatar
    Albin Henriksson committed
      padding-left: 0;
    
    export const ViewButton = styled(Button)<ViewButtonProps>`
    
      background: ${(props) => (props.$activeView ? '#5a0017' : undefined)};
    
    `
    
    export const ViewButtonClicked = styled(Button)`
      background: #5a0017;
    
    export const SlideList = styled(List)`
    
      height: calc(100% - ${SlideListHeight}px);
      padding: 0px;
      overflow-y: auto;
    `
    
    export const RightPanelScroll = styled(List)`
    
      padding: 0px;
    
      overflow-y: auto;
    
    export const SlideListItem = styled(ListItem)`
      text-align: center;
    
      height: ${SlideListHeight}px;
    
    
    export const PresentationEditorContainer = styled.div`
      height: 100%;
    `
    
    
    export const CenteredSpinnerContainer = styled.div`
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;
    `
    
    Albin Henriksson's avatar
    Albin Henriksson committed
    
    export const HomeIcon = styled.img`
    
      height: ${AppBarHeight}px;
    `
    
    export const LeftDrawer = styled(Drawer)<DrawerSizeProps>`
    
      width: ${(props) => (props ? props.$leftDrawerWidth : 0)}px;
    
      flex-shrink: 0;
      position: relative;
      z-index: 1;
    `
    
    export const RightDrawer = styled(Drawer)<DrawerSizeProps>`
    
      width: ${(props) => (props ? props.$rightDrawerWidth : 0)}px;
    
      flex-shrink: 0;
    `
    
    export const AppBarEditor = styled(AppBar)<DrawerSizeProps>`
    
      width: calc(100% - ${(props) => (props ? props.$rightDrawerWidth : 0)}px);
    
      margin-left: $leftDrawerWidth;
      margin-right: $rightDrawerWidth;
    
    `
    
    // Necessary for content to be below app bar
    export const ToolbarMargin = styled.div`
      padding-top: ${AppBarHeight}px;
    `
    
    export const FillLeftContainer = styled.div<DrawerSizeProps>`
    
      width: ${(props) => (props ? props.$leftDrawerWidth : 0)}px;
    
      height: calc(100% - ${SlideListHeight}px);
      overflow: hidden;
    `
    
    export const FillRightContainer = styled.div<DrawerSizeProps>`
    
      width: ${(props) => (props ? props.$rightDrawerWidth : 0)}px;
    
      height: 100%;
      overflow-y: auto;
      background: #e9e9e9;
    `
    
    export const PositionBottom = styled.div`
      position: absolute;
      bottom: 0;
      width: 100%;
    `
    
    export const CompetitionName = styled(Typography)`
      text-decoration: none;
      position: absolute;
      left: 180px;
    
    Albin Henriksson's avatar
    Albin Henriksson committed
    `