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
186a6fff
Commit
186a6fff
authored
Nov 12, 2019
by
Halvor Horge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Attempt at hamburgermenu
parent
4a82a05b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
15 deletions
+39
-15
p4/.expo/packager-info.json
p4/.expo/packager-info.json
+4
-4
p4/src/components/Body.js
p4/src/components/Body.js
+0
-1
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/.expo/packager-info.json
View file @
186a6fff
...
...
@@ -2,8 +2,8 @@
"devToolsPort"
:
19002
,
"expoServerPort"
:
19000
,
"packagerPort"
:
19001
,
"packagerPid"
:
2212
,
"expoServerNgrokUrl"
:
"https://5v-9za.
anonymous
.p4.exp.direct"
,
"packagerNgrokUrl"
:
"https://packager.5v-9za.
anonymous
.p4.exp.direct"
,
"ngrokPid"
:
1
260
"packagerPid"
:
16820
,
"expoServerNgrokUrl"
:
"https://5v-9za.
hhorge
.p4.exp.direct"
,
"packagerNgrokUrl"
:
"https://packager.5v-9za.
hhorge
.p4.exp.direct"
,
"ngrokPid"
:
1
4216
}
p4/src/components/Body.js
View file @
186a6fff
...
...
@@ -8,7 +8,6 @@ import SideMenuComp from './SideMenu'
//import Content from '../Content/Content.js';
//import Wordcloud from '../Wordcloud/Wordcloud.js';
//hello
const
Body
=
()
=>
{
return
(
<
ScrollView
>
...
...
p4/src/components/SideMenu.js
View file @
186a6fff
import
{
SideMenu
,
List
,
ListItem
}
from
'
react-native-elements
'
;
//
import { SideMenu, List, ListItem } from 'react-native-elements';
import
{
useSelector
}
from
"
react-redux
"
;
import
Filtering
from
'
./Filtering
'
import
React
from
'
react
'
;
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
);
return
(
<
SideMenu
isOpen
=
{
false
}
menu
=
{
stateSideMenu
}
>
<
View
styles
=
{
styles
.
container
}
>
<
Drawer
open
=
{
stateSideMenu
}
type
=
"
static
"
tapToClose
=
{
true
}
openDrawerOffset
=
{
0.5
}
closedDrawerOffset
=
{
0
}
content
=
{
<
Filtering
/>
}
styles
=
{
styles
.
drawerStyle
}
tweenHandler
=
{
Drawer
.
tweenPresets
.
parallax
}
tweenEasing
=
{
"
easeInQuad
"
}
tweenDuration
=
{
400
}
onClose
=
{
onHamburgerClick
}
/
>
<
/View
>
<
/SideMenu
>
)
}
export
default
SideMenuComp
;
\ No newline at end of file
export
default
SideMenu
;
\ No newline at end of file
p4/src/components/Top.js
View file @
186a6fff
...
...
@@ -7,10 +7,14 @@ import { toggleSideMenu } from "../actions";
const
Top
=
()
=>
{
const
dispatch
=
useDispatch
();
onHamburgerClick
=
()
=>
{
dispatch
(
toggleSideMenu
())
}
return
(
<
Header
style
=
{
styles
.
container
}
leftComponent
=
{{
icon
:
'
menu
'
,
color
:
'
#fff
'
}}
leftComponent
=
{{
icon
:
'
menu
'
,
color
:
'
#fff
'
,
onPress
:
()
=>
onHamburgerClick
()
}}
centerComponent
=
{{
text
:
'
MY TITLE
'
,
style
:
{
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