Skip to content

Commit c0420a2

Browse files
committed
Add partial for sample output
1 parent 4f433a0 commit c0420a2

File tree

3 files changed

+36
-7
lines changed

3 files changed

+36
-7
lines changed

src/partials/SampleOutput.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import React from 'react'
2+
import PagesContext from '../contexes/PagesContext'
3+
import styled from 'styled-components'
4+
5+
const accentColor = '#CCC'
6+
7+
const Wrapper = styled.div`
8+
padding 1rem;
9+
margin-bottom: 2rem;
10+
border-left: 0.2rem solid ${accentColor};
11+
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);
12+
border-radius: 4px;
13+
`
14+
15+
const Body = styled.div`
16+
padding-bottom: 0.5rem;
17+
font-family: monospace;
18+
p {
19+
margin-bottom: 0;
20+
}
21+
`
22+
23+
const Note = styled.div`
24+
float: right;
25+
`
26+
27+
export default props => {
28+
return (
29+
<Wrapper>
30+
<Note>Esimerkkitulostus</Note>
31+
<Body>{props.children}</Body>
32+
</Wrapper>
33+
)
34+
}

src/partials/TextBox.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ const Header = styled.h3`
2929
border-bottom: 1px solid #f7f7f9;
3030
`
3131

32-
const HeaderMuted = styled.span`
33-
color: #818a91 !important;
34-
font-size: 80%;
35-
font-weight: 400;
36-
margin-right: 0.2rem;
37-
`
38-
3932
const Body = styled.div`
4033
padding-bottom: 0.5rem;
4134
`

src/partials/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ import Test from './Test'
2424
import PagesInThisSection from './PagesInThisSection'
2525
import ProgrammingExercise from './ProgrammingExercise'
2626
import TextBox from './TextBox'
27+
import SampleOutput from './SampleOutput'
2728

2829
const mapping = {
2930
test: Test,
3031
'pages-in-this-section': PagesInThisSection,
3132
'programming-exercise': ProgrammingExercise,
3233
'text-box': TextBox,
34+
'sample-output': SampleOutput,
3335
}
3436

3537
export default () => {

0 commit comments

Comments
 (0)