forked from rage/java-programming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSampleOutput.js
More file actions
48 lines (40 loc) · 1.01 KB
/
SampleOutput.js
File metadata and controls
48 lines (40 loc) · 1.01 KB
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
38
39
40
41
42
43
44
45
46
47
48
import React from "react"
import styled from "styled-components"
import withSimpleErrorBoundary from "../util/withSimpleErrorBoundary"
import { withTranslation } from "react-i18next"
const accentColor = "#CCC"
const Wrapper = styled.div`
padding 1rem;
padding-top: 0.2rem;
margin-bottom: 2rem;
border-left: 0.2rem solid ${accentColor};
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12);
border-radius: 4px;
`
const Body = styled.div`
padding-bottom: 0.5rem;
font-family: monospace;
white-space: pre-wrap;
p:last-of-type {
margin-bottom: 0;
}
em,
strong {
color: red;
font-weight: normal;
}
`
const Note = styled.div`
width: 100%;
text-align: right;
font-size: 0.75rem;
`
const SampleOutput = props => {
return (
<Wrapper>
<Note>{props.t("sampleOutput")}</Note>
<Body>{props.children}</Body>
</Wrapper>
)
}
export default withTranslation("common")(withSimpleErrorBoundary(SampleOutput))