Skip to content

Commit

Permalink
feat(decission): add decission handling for chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerd Müller committed Jun 12, 2020
1 parent 6892eea commit b3a4e7e
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
Binary file added apps/demol/src/assets/22.webp
Binary file not shown.
Binary file added apps/demol/src/assets/35.webp
Binary file not shown.
Binary file added apps/demol/src/assets/46.webp
Binary file not shown.
18 changes: 14 additions & 4 deletions db.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,23 @@
"content": [
{
"type": "image",
"layer": "base",
"value": "16"
"layer": "fore",
"value": "22"
},
{
"type": "image",
"layer": "fore",
"value": "35"
},
{
"type": "text",
"layer": "fore",
"value": "Wen möchtest du auf diesem Weg begleiten?"
"type": "image",
"value": "46"
},
{
"value": "Wen möchtest du auf diesem Weg begleiten?",
"type": "text",
"layer": "fore"
}
]
}
Expand Down
2 changes: 2 additions & 0 deletions libs/ui/src/lib/chapter/chapter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Title from '../title/title';
import Video from '../video/video';
import Image from '../image/image';
import Text from '../text/text';
import Decission from '../decission/decission';
import { makeStyles } from '@material-ui/core/styles';
// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries
import { Chapter, ContentType } from '@gerdesque/data';
Expand Down Expand Up @@ -32,6 +33,7 @@ export const ChapterComponent = (props: Chapter) => {
{content.type === ContentType.Text && <Text value={content.value} />}
{content.type === ContentType.Video && <Video value={content.value} />}
{content.type === ContentType.Image && <Image value={content.value} />}
{content.type === ContentType.Misc && <Decission value={content.value} />}
</div>)
}

Expand Down
8 changes: 4 additions & 4 deletions libs/ui/src/lib/decission/decission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import React from 'react';
import './decission.scss';

/* eslint-disable-next-line */
export interface DecissionProps {}
export interface DecissionProps {
value: string
}

export const Decission = (props: DecissionProps) => {
return (
<div>
<h1>Welcome to decission component!</h1>
</div>
<div className='box'><p>{props.value}</p>!</div>
);
};

Expand Down

0 comments on commit b3a4e7e

Please sign in to comment.