Skip to content

Commit

Permalink
feat(summary): add summary component
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerd Müller committed Jun 29, 2020
1 parent 34f2d44 commit 4f58b8a
Show file tree
Hide file tree
Showing 20 changed files with 117 additions and 84 deletions.
140 changes: 60 additions & 80 deletions apps/demol/src/app/app.json

Large diffs are not rendered by default.

Binary file added apps/demol/src/assets/02_12_(17).webp
Binary file not shown.
Binary file added apps/demol/src/assets/02_1455_(144).webp
Binary file not shown.
Binary file added apps/demol/src/assets/02_1455_(147).webp
Binary file not shown.
Binary file added apps/demol/src/assets/02_1455_(50).webp
Binary file not shown.
Binary file not shown.
Binary file added apps/demol/src/assets/02_84_(9).webp
Binary file not shown.
Binary file not shown.
Binary file added apps/demol/src/assets/2-1781_Seite135.webp
Binary file not shown.
Binary file added apps/demol/src/assets/2_1033_Seite58.webp
Binary file not shown.
Binary file added apps/demol/src/assets/2_608_Seite112.webp
Binary file not shown.
1 change: 1 addition & 0 deletions libs/ui/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './lib/summary/summary';
export * from './lib/rain/rain';
export * from './lib/birds/birds';
export * from './lib/memory/memory';
Expand Down
2 changes: 2 additions & 0 deletions libs/ui/src/lib/group/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import TicTacToe from '../tictactoe/tictactoe';
import Daily from '../daily/daily';
import Redirect from '../redirect/redirect';
import Info from '../info/info';
import Summary from '../summary/summary';

import { GroupProps } from '@gerdesque/data';

Expand All @@ -26,6 +27,7 @@ const ContentType = {
puzzle: Puzzle,
memory: Memory,
suitcase: Suitcase,
summary: Summary,
tictactoe: TicTacToe,
daily: Daily,
decission: Decission
Expand Down
6 changes: 5 additions & 1 deletion libs/ui/src/lib/info/info.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.infoLink {
position: absolute;
top: 37%;
top: 25%;
left: 5%;
cursor: pointer;
width: 1em;
Expand All @@ -19,6 +19,10 @@
background-color: rgba(0,0,0,.7);
color: #fff;
font-size: 1.1rem;

p {
text-shadow: none;
}
}

&:hover .infoText {
Expand Down
6 changes: 3 additions & 3 deletions libs/ui/src/lib/nav/nav.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.navigation {
right: 2%;
position: absolute;
top: 33%;
top: 10%;
z-index: 6;

align-items: center;
Expand All @@ -14,8 +14,8 @@
.navigation--item {
cursor: pointer;
border-radius: 9999px;
height: 20px;
width: 20px;
height: 28px;
width: 28px;
background-color: transparent;
border: 1px solid rgba(0, 0, 0, .3);
margin: 8px 0;
Expand Down
4 changes: 4 additions & 0 deletions libs/ui/src/lib/suitcase/suitcase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
align-items: center;
}

.suitcase .bag picture{
width: 50%;
}

.suitcase .items > * {
width: 25%;
margin: auto;
Expand Down
9 changes: 9 additions & 0 deletions libs/ui/src/lib/summary/summary.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
details {
width: 60%;
font-size: 1.5rem;
padding: 0 50px;
}

summary:focus {
outline-style: none;
}
11 changes: 11 additions & 0 deletions libs/ui/src/lib/summary/summary.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import { render } from '@testing-library/react';

import Summary from './summary';

describe(' Summary', () => {
it('should render successfully', () => {
const { baseElement } = render(<Summary />);
expect(baseElement).toBeTruthy();
});
});
21 changes: 21 additions & 0 deletions libs/ui/src/lib/summary/summary.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';

import './summary.scss';

/* eslint-disable-next-line */
export interface SummaryProps {
value: string
title?: string
option?: string
}

export const Summary = (props: SummaryProps) => {
return (
<details>
<summary>{props.value}</summary>
<p>{props.title}</p>
</details>
);
};

export default Summary;
1 change: 1 addition & 0 deletions libs/ui/src/lib/ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@import "scrollicon/scrollicon";
@import "smokingpit/smokingpit";
@import "suitcase/suitcase";
@import "summary/summary";
@import "text/text";
@import "tictactoe/tictactoe";
@import "title/title";
Expand Down

0 comments on commit 4f58b8a

Please sign in to comment.