Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Patrik Meijer
react-components
Commits
ebbc572a
Commit
ebbc572a
authored
Nov 21, 2018
by
Patrik Meijer
Browse files
style ./demo
parent
1c0368d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
demo/demoApp.jsx
View file @
ebbc572a
...
...
@@ -15,7 +15,7 @@ import DemoUserProfileNavigator from '../src/components/UserProfileNavigator/dem
import
DemoModalSpinner
from
'
../src/components/ModalSpinner/demo
'
;
import
DemoContainmentCanvas
from
'
../src/components/ContainmentCanvas/demo
'
;
import
DemoSingleConnectedNode
from
'
../src/components/SingleConnectedNode/demo
'
;
import
DemoInfoCard
from
'
../src/components/InfoCard/
/
demo
'
;
import
DemoInfoCard
from
'
../src/components/InfoCard/demo
'
;
class
demoApp
extends
Component
{
...
...
@@ -50,7 +50,7 @@ class demoApp extends Component {
{
component
:
<
DemoContainmentCanvas
/>,
title
:
'
ContainmentCanvas
'
,
height
:
400
height
:
400
,
},
{
component
:
<
DemoSingleConnectedNode
/>,
...
...
@@ -59,27 +59,28 @@ class demoApp extends Component {
{
component
:
<
DemoInfoCard
/>,
title
:
'
InfoCard
'
,
height
:
200
height
:
200
,
},
];
return
(
<
div
>
{
DEMOS
.
map
((
info
)
=>
{
return
(
<
ExpansionPanel
defaultExpanded
key
=
{
info
.
title
}
>
<
ExpansionPanelSummary
>
<
Typography
variant
=
"headline"
color
=
"textSecondary"
>
{
info
.
title
}
</
Typography
>
</
ExpansionPanelSummary
>
<
div
style
=
{
{
padding
:
20
,
height
:
info
.
height
}
}
>
{
info
.
component
}
</
div
>
</
ExpansionPanel
>
)
})
}
{
DEMOS
.
map
(
info
=>
(
<
ExpansionPanel
defaultExpanded
key
=
{
info
.
title
}
>
<
ExpansionPanelSummary
>
<
Typography
variant
=
"headline"
color
=
"textSecondary"
>
{
info
.
title
}
</
Typography
>
</
ExpansionPanelSummary
>
<
div
style
=
{
{
padding
:
20
,
height
:
info
.
height
,
}
}
>
{
info
.
component
}
</
div
>
</
ExpansionPanel
>))
}
</
div
>);
}
;
}
;
}
}
export
default
DragDropContext
(
HTML5Backend
)(
demoApp
);
\ No newline at end of file
export
default
DragDropContext
(
HTML5Backend
)(
demoApp
);
demo/index.jsx
View file @
ebbc572a
/* globals document */
import
React
from
'
react
'
;
import
ReactDOM
from
'
react-dom
'
;
import
App
from
'
./demoApp
.jsx
'
;
import
App
from
'
./demoApp
'
;
ReactDOM
.
render
(<
App
/>,
document
.
getElementById
(
'
root
'
));
\ No newline at end of file
ReactDOM
.
render
(<
App
/>,
document
.
getElementById
(
'
root
'
));
webpack.config.js
View file @
ebbc572a
...
...
@@ -28,6 +28,6 @@ module.exports = {
devServer
:
{
contentBase
:
[
path
.
join
(
__dirname
,
'
demo
'
,
'
public
'
),
path
.
join
(
__dirname
,
'
demo
'
,
'
static
'
)],
compress
:
true
,
port
:
9000
}
port
:
9000
,
}
,
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment