Skip to content

Commit e16aa22

Browse files
neyser zananeyser zana
authored andcommitted
logo is now added
1 parent 760d744 commit e16aa22

File tree

5 files changed

+29
-39
lines changed

5 files changed

+29
-39
lines changed

build/webpack-bundle.js

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/webpack-bundle.js.map

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/app.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ h2{
4949
}
5050

5151
#logo{
52-
width: 100px;
53-
height: 100px;
52+
width: 50px;
53+
height: 50px;
5454
}
5555

5656
#treeWrapper{
@@ -108,16 +108,16 @@ button{
108108
margin: 0px;
109109
}
110110
#window-nav {
111+
display: flex;
112+
justify-content: space-evenly;
113+
align-items: center;
111114
margin: 5px 0px 20px 0px;
112115
text-align: center;
116+
padding: 0px 15px;
113117
}
114-
.window-btn-wrapper {
115-
width: 50%;
116-
box-sizing: border-box;
117-
padding: 30px;
118-
}
118+
119119
.window-btn{
120-
width: 30%;
120+
width: 25%;
121121
height: 35px;
122122
box-sizing: border-box;
123123
color: #555;

public/graphql.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
}
2323

2424
#graphql-schema {
25-
background-color: rgba(214, 214, 214, 0.4);
26-
border: 1px solid rgba(0, 0, 0, 0.3);
27-
border-radius: 5px;
25+
background-color: white;;
26+
box-shadow: 0 15px 30px 0 rgba(0,0,0,0.11),
27+
0 5px 15px 0 rgba(0,0,0,0.08);
28+
padding: 10px 25px;
2829
overflow-y: scroll;
2930
max-height: 600px;
30-
padding: 10px;
3131
}
3232

3333
.graphql-p {

src/devtools.js

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class App extends Component {
5353
let diff = recurseDiff(oldstate, this.state.appReactDOM);
5454
appState.setState({ stateDiff: diff });
5555
}
56-
56+
5757
//if there is an active setTimeout, clear it
5858
clearTimeout(timeout);
5959
timeout = setTimeout(() => {
@@ -97,14 +97,14 @@ class App extends Component {
9797
headers: { 'Content-Type': 'application/json' },
9898
body: JSON.stringify({ query: introspectionQuery })
9999
})
100-
.then(res => res.json())
101-
.then(json =>
102-
this.setState({
103-
schema: JSON.stringify(json.data)
104-
})
100+
.then(res => res.json())
101+
.then(json =>
102+
this.setState({
103+
schema: JSON.stringify(json.data)
104+
})
105105
);
106-
}
107106
}
107+
}
108108

109109
//* invoke schema fetch only after a log object from a previous response is available
110110
componentDidUpdate(prevProps, prevState) {
@@ -128,7 +128,7 @@ class App extends Component {
128128
this.setState({ window: 'React' });
129129
document.querySelector('#reactbtn').classList.add('active');
130130
document.querySelector('#graphqlbtn').classList.remove('active');
131-
} else if(this.state.window === 'React' && target.dataset.btn === 'Graphql'){
131+
} else if (this.state.window === 'React' && target.dataset.btn === 'Graphql') {
132132
this.setState({ window: 'Graphql' });
133133
document.querySelector('#reactbtn').classList.remove('active');
134134
document.querySelector('#graphqlbtn').classList.add('active');
@@ -137,7 +137,7 @@ class App extends Component {
137137

138138
// * Handles the filter for the component tree
139139
handleFilter(e, arr) {
140-
if(e.target.classList.contains('toggleOn')) {
140+
if (e.target.classList.contains('toggleOn')) {
141141
e.target.classList.remove('toggleOn')
142142
} else {
143143
e.target.classList.add('toggleOn');
@@ -196,21 +196,17 @@ class App extends Component {
196196
<div>
197197
{this.state.appState.length === 0 ?
198198
<div id='devToolsLoader'>
199-
<img src='./../public/assests/logo-card.png' alt='devtool logo'/>
199+
<img src='./../public/assets/logo-card.png' alt='devtool logo card' />
200200
<h1>Please trigger a setState() to activate Lucid devtool.<br /></h1>
201201
<p>Lucid works best on apps using React v16+ in development mode</p>
202202
</div>
203203
:
204204
<div id='app-container'>
205205
<div id='window'>
206206
<div id='window-nav'>
207-
<img id='logo' src='./logo.png' alt='devtool logo'/>
208-
<span class='window-btn-wrapper'>
209-
<button className='window-btn active' id='graphqlbtn' data-btn='Graphql' onClick={(e) => { this.handleWindowChange(e.target); }}>GraphQL</button>
210-
</span>
211-
<span class='window-btn-wrapper'>
212-
<button className='window-btn' id='reactbtn' data-btn='React' onClick={(e) => { this.handleWindowChange(e.target); }}>Component Tree</button>
213-
</span>
207+
<img id='logo' src='./logo.png' alt='devtool logo' />
208+
<button className='window-btn active' id='graphqlbtn' data-btn='Graphql' onClick={(e) => { this.handleWindowChange(e.target); }}>GraphQL</button>
209+
<button className='window-btn' id='reactbtn' data-btn='React' onClick={(e) => { this.handleWindowChange(e.target); }}>Component Tree</button>
214210
</div>
215211

216212
{/* This checks what window the user has click on.

0 commit comments

Comments
 (0)