ChartInfoBox.tsx 1014 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import React, { FunctionComponent } from 'react'
import styled from 'styled-components'
import { InputWithLabel } from '../inputWithLabel/InputWithLabel'
import { distance } from '../../style/sizes'

interface ChartInfoBoxProps {
    description: string
    bold?: boolean
}

export const ChartInfoBox: FunctionComponent<ChartInfoBoxProps> = props => {

    return <StyledChartInfoBox>
        <StyledRow>
            <InputWithLabel bold={props.bold} label={'Description:'}>
                {props.description}
            </InputWithLabel>
        </StyledRow>
        <StyledRow>
            <InputWithLabel bold={props.bold} label={'Options:'}>
                {props.children}
            </InputWithLabel>
        </StyledRow>
    </StyledChartInfoBox>
}

const StyledChartInfoBox = styled.div`
  display: flex;
  flex-direction: column;
  background: ${({ theme }) => theme.colors.backgroundSecondary};
`

const StyledRow = styled.div`
  padding: ${distance.large};
  display: flex;
  flex-direction: row;
`