Commit cdcdaf23 authored by Marek Veselý's avatar Marek Veselý
Browse files

use a class intead of inline styling

parent 80efdc33
Loading
Loading
Loading
Loading
+10 −12
Original line number Diff line number Diff line
import FileViewRedirectButton from '@/components/FileViewRedirectButton'
import { HIGHLIGHTED_COLOR } from '@/dashboard/utilities'
import { Button, Card } from '@blueprintjs/core'
import { css } from '@emotion/css'
import { EmailTemplate } from '@inject/graphql/fragments/EmailTemplate.generated'
import { FC, MouseEvent, MouseEventHandler } from 'react'

export const th = css`
const th = css`
  text-align: left;
  vertical-align: text-top;
  white-space: nowrap;
  width: 150px;
`

export const td = css`
const td = css`
  white-space: pre-wrap;
  vertical-align: text-top;
  padding: 5px 10px;
`

const card = css`
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 1rem;
`

interface TemplateCardProps {
  template: EmailTemplate
  teamId: string
@@ -32,15 +38,7 @@ const TemplateCard: FC<TemplateCardProps> = ({
  exerciseId,
  onClick,
}) => (
  <Card
    key={template.id}
    style={{
      backgroundColor: template.submitted ? HIGHLIGHTED_COLOR : undefined,
      display: 'flex',
      flexDirection: 'column',
      justifyContent: 'space-between',
      margin: '1rem',
    }}>
  <Card key={template.id} className={card}>
    <table>
      <tbody>
        <tr>