Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Project4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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 8
Project4
Commits
e2e037fb
Commit
e2e037fb
authored
Nov 14, 2019
by
Joakim Hantho Qvale
Browse files
Options
Browse Files
Download
Plain Diff
#6
merging conflicts
parents
2c3bd734
a7281219
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
10 deletions
+35
-10
p4/src/components/SideMenu.js
p4/src/components/SideMenu.js
+30
-9
p4/src/components/Top.js
p4/src/components/Top.js
+5
-1
No files found.
p4/src/components/SideMenu.js
View file @
e2e037fb
import
{
SideMenu
,
List
,
ListItem
}
from
'
react-native-elements
'
;
//
import { SideMenu, List, ListItem } from 'react-native-elements';
import
{
useSelector
}
from
"
react-redux
"
;
import
{
useSelector
}
from
"
react-redux
"
;
import
Filtering
from
'
./Filtering
'
import
Filtering
from
'
./Filtering
'
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
View
,
Text
}
from
'
react-native
'
;
import
{
View
,
Text
}
from
'
react-native
'
;
import
{
toggleSideMenu
}
from
"
../actions
"
;
import
Drawer
from
'
react-native-drawer
'
import
{
useDispatch
}
from
"
react-redux
"
;
const
SideMenuComp
=
()
=>
{
const
SideMenu
=
()
=>
{
const
dispatch
=
useDispatch
();
onHamburgerClick
=
()
=>
{
dispatch
(
toggleSideMenu
())
}
const
stateSideMenu
=
useSelector
(
state
=>
state
.
sideMenu
);
const
stateSideMenu
=
useSelector
(
state
=>
state
.
sideMenu
);
return
(
return
(
<
SideMenu
<
View
styles
=
{
styles
.
container
}
>
isOpen
=
{
false
}
<
Drawer
menu
=
{
stateSideMenu
}
open
=
{
stateSideMenu
}
>
type
=
"
static
"
tapToClose
=
{
true
}
<
/SideMenu
>
openDrawerOffset
=
{
0.5
}
closedDrawerOffset
=
{
0
}
content
=
{
<
Filtering
/>
}
styles
=
{
styles
.
drawerStyle
}
tweenHandler
=
{
Drawer
.
tweenPresets
.
parallax
}
tweenEasing
=
{
"
easeInQuad
"
}
tweenDuration
=
{
400
}
onClose
=
{
onHamburgerClick
}
/
>
<
/View
>
)
)
}
}
export
default
SideMenuComp
;
export
default
SideMenu
;
\ No newline at end of file
\ No newline at end of file
p4/src/components/Top.js
View file @
e2e037fb
...
@@ -7,10 +7,14 @@ import { toggleSideMenu } from "../actions";
...
@@ -7,10 +7,14 @@ import { toggleSideMenu } from "../actions";
const
Top
=
()
=>
{
const
Top
=
()
=>
{
const
dispatch
=
useDispatch
();
const
dispatch
=
useDispatch
();
onHamburgerClick
=
()
=>
{
dispatch
(
toggleSideMenu
())
}
return
(
return
(
<
Header
style
=
{
styles
.
container
}
<
Header
style
=
{
styles
.
container
}
leftComponent
=
{{
icon
:
'
menu
'
,
color
:
'
#fff
'
}}
leftComponent
=
{{
icon
:
'
menu
'
,
color
:
'
#fff
'
,
onPress
:
()
=>
onHamburgerClick
()
}}
centerComponent
=
{{
text
:
'
MY TITLE
'
,
style
:
{
color
:
'
#fff
'
}
}}
centerComponent
=
{{
text
:
'
MY TITLE
'
,
style
:
{
color
:
'
#fff
'
}
}}
rightComponent
=
{{
icon
:
'
home
'
,
color
:
'
#fff
'
}}
rightComponent
=
{{
icon
:
'
home
'
,
color
:
'
#fff
'
}}
/
>
/
>
...
...
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