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
58e43b08
Commit
58e43b08
authored
Sep 25, 2019
by
Svein Olav Styve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine favorite styling
parent
746e315b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
src/App.js
src/App.js
+1
-1
src/components/FavoriteSection.js
src/components/FavoriteSection.js
+3
-4
src/style/FavoriteButton.css
src/style/FavoriteButton.css
+18
-2
No files found.
src/App.js
View file @
58e43b08
...
...
@@ -220,6 +220,7 @@ class App extends React.Component {
<
div
className
=
"
cluster
"
>
<
div
className
=
"
chooser
"
>
<
DisplayChooser
categorySelections
=
{
categorySelections
}
handler
=
{
this
}
/
>
<
FavoriteSection
save
=
{
this
.
saveAsFavorite
}
open
=
{
this
.
openFavorite
}
/
>
<
/div
>
<
div
className
=
"
artworkArea
"
>
<
Artwork
artwork
=
{
this
.
state
.
artwork
}
...
...
@@ -227,7 +228,6 @@ class App extends React.Component {
categorySelections
=
{
categorySelections
}
/
>
<
/div
>
<
/div
>
<
FavoriteSection
save
=
{
this
.
saveAsFavorite
}
open
=
{
this
.
openFavorite
}
/
>
<
SessionElement
sessionHistory
=
{
sessionHistory
}
sessionClicked
=
{
this
.
sessionClicked
}
sessionIndex
=
{
this
.
state
.
sessionCounter
}
...
...
src/components/FavoriteSection.js
View file @
58e43b08
...
...
@@ -15,11 +15,12 @@ export default class FavoriteSection extends React.Component {
this
.
setState
({
showSaveFeedback
:
true
});
this
.
timerID
=
set
Interval
(
this
.
timerID
=
set
Timeout
(
()
=>
{
this
.
setState
({
showSaveFeedback
:
false
});
clearInterval
(
this
.
timerID
);
},
3500
);
...
...
@@ -29,10 +30,8 @@ export default class FavoriteSection extends React.Component {
return
(
<
div
className
=
"
Button-container
"
>
<
button
onClick
=
{
this
.
save
}
>
Save
as
favorite
<
/button
>
<
button
onClick
=
{
this
.
props
.
open
}
>
Open
favo
u
rite
<
/button
>
<
button
onClick
=
{
this
.
props
.
open
}
>
Open
favorite
<
/button
>
<
p
>
{
(
this
.
state
.
showSaveFeedback
)
&&
"
Favorite saved!
"
}
<
/p
>
<
/div
>
);
}
...
...
src/style/FavoriteButton.css
View file @
58e43b08
.Button-container
{
margin
:
5px
auto
;
margin
:
auto
;
padding-top
:
5px
;
border
:
2px
solid
#222
;
}
.Button-container
button
{
margin
:
10px
;
margin
:
10px
auto
;
display
:
block
;
padding
:
5px
;
font-size
:
1rem
;
background
:
#A20C25
;
...
...
@@ -16,4 +19,17 @@
.Button-container
button
:hover
{
cursor
:
pointer
;
}
.Button-container
p
{
min-height
:
25px
;
color
:
white
;
text-align
:
center
;
}
@media
screen
and
(
max-width
:
960px
)
{
.Button-container
button
{
display
:
inline-block
;
margin
:
10px
;
}
}
\ 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