Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
dist
dist
53 changes: 39 additions & 14 deletions src/app/components/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useContext, Component } from 'react';
import { createGlobalStyle } from 'styled-components';

// data
import data from '../data.jsx'
Expand All @@ -10,6 +11,27 @@ import SplitPane from '../container/SplitPane.jsx';
import Events from '../container/Events.jsx';
import Details from '../container/Details.jsx';

const GlobalStyle = createGlobalStyle`
html {
box-sizing: border-box;
font-size: 10px;
height: 100%;
width: 100%;
}
* *:before, *:after {
box-sizing: inherit;
}
body {
padding: 0;
margin: 0;
font-size: 1.5rem;
line-height: 2;
height: 100%;
width: 100%;
}
`;


class App extends Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -71,20 +93,23 @@ class App extends Component {
action, id, payload, state, data
} = this.state;
return (
<SplitPane
left={
<Events data={data} addAction={this.addActionToView} />
}
right={
(
<Details
action={action}
id={id}
payload={payload}
actionState={state}
/>
)}
/>
<>
<GlobalStyle />
<SplitPane
left={
<Events data={data} addAction={this.addActionToView} />
}
right={
(
<Details
action={action}
id={id}
payload={payload}
actionState={state}
/>
)}
/>
</>
);
}
}
Expand Down
14 changes: 9 additions & 5 deletions src/app/components/EventCards/EventCreator.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import React from 'react';

import { EventCard, EventTimeDiv } from '../../styles/Events.jsx';

export default function EventCreator(props) {
// renders individual action
const { action, id, addAction } = props;

const { action, id, addAction, actionTime } = props;
console.log(EventCard);
return (
<div id={id} onClick={ addAction }>
{action}
</div>
<EventCard id={id} onClick={addAction}>
&#x2630; {action}
<EventTimeDiv>{actionTime || '00:00:01'}</EventTimeDiv>
</EventCard>

);
}
Loading