Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IT2810_P2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
IT2810-H19
T
Teams
Team 36
IT2810_P2
Commits
400f7946
Commit
400f7946
authored
Sep 24, 2019
by
Karl Petter Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor displaychooser
parent
04b68d2b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
src/components/DisplayChooser.js
src/components/DisplayChooser.js
+3
-3
src/components/DisplayChooserComponent.js
src/components/DisplayChooserComponent.js
+1
-1
src/style/DisplayChooser.css
src/style/DisplayChooser.css
+11
-0
No files found.
src/components/DisplayChooser.js
View file @
400f7946
import
React
from
'
react
'
;
import
MediaContainer
from
"
./MediaContainer
"
;
import
'
../style/DisplayChooser
Component
.css
'
;
import
'
../style/DisplayChooser.css
'
;
export
default
class
DisplayChooser
extends
React
.
Component
{
...
...
@@ -15,9 +15,9 @@ export default class DisplayChooser extends React.Component {
};
render
()
{
const
categoryNames
=
[
"
C
ategory 1
"
,
"
Category 2
"
,
"
Category 3
"
];
const
categoryNames
=
[
"
C
ity
"
,
"
Jungle
"
,
"
Seaside
"
];
return
(
<
div
className
=
"
Display-chooser
-component
"
>
<
div
className
=
"
Display-chooser
"
>
<
MediaContainer
checkedIndex
=
{
this
.
props
.
categorySelections
.
textCat
}
categoryNames
=
{
categoryNames
}
media
=
"
Text
"
handler
=
{
this
}
/
>
<
MediaContainer
checkedIndex
=
{
this
.
props
.
categorySelections
.
imageCat
}
categoryNames
=
{
categoryNames
}
...
...
src/components/DisplayChooserComponent.js
View file @
400f7946
import
React
from
'
react
'
;
import
MediaComponent
from
"
./MediaComponent
"
;
import
'
../style/DisplayChooser
Component
.css
'
;
import
'
../style/DisplayChooser.css
'
;
export
default
class
DisplayChooserComponent
extends
React
.
Component
{
...
...
src/style/DisplayChooser
Component
.css
→
src/style/DisplayChooser.css
View file @
400f7946
.Display-chooser
-component
{
.Display-chooser
{
display
:
inline-flex
;
flex-direction
:
column
;
font-family
:
sans-serif
;
}
@media
screen
and
(
max-width
:
480px
){
.Display-chooser
{
flex-direction
:
row
;
}
}
\ No newline at end of file
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