Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
backup
Drip
Commits
bf4446c7
Commit
bf4446c7
authored
4 years ago
by
mashazyu
Committed by
Sofiya Tepikin
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Moves Logo component to separate file
parent
4d6f0db3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/header/index.js
+7
-47
7 additions, 47 deletions
components/header/index.js
components/header/logo.js
+41
-0
41 additions, 0 deletions
components/header/logo.js
with
48 additions
and
47 deletions
components/header/index.js
+
7
−
47
View file @
bf4446c7
import
React
,
{
Component
}
from
'
react
'
import
React
,
{
Component
}
from
'
react
'
import
{
StyleSheet
,
TouchableOpacity
,
View
}
from
'
react-native
'
import
{
StyleSheet
,
View
}
from
'
react-native
'
import
PropTypes
from
'
prop-types
'
import
AppText
from
'
.
./common/app-text
'
import
Logo
from
'
.
/logo
'
import
SideMenu
from
'
./side-menu
'
import
SideMenu
from
'
./side-menu
'
import
{
connect
}
from
'
react-redux
'
import
{
Colors
,
Containers
,
Sizes
}
from
'
../../styles/redesign
'
import
{
navigate
}
from
'
../../slices/navigation
'
import
{
Colors
,
Containers
,
Fonts
,
Sizes
}
from
'
../../styles/redesign
'
class
Header
extends
Component
{
static
propTypes
=
{
navigate
:
PropTypes
.
func
.
isRequired
}
export
default
class
Header
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
...
@@ -31,48 +22,17 @@ class Header extends Component {
...
@@ -31,48 +22,17 @@ class Header extends Component {
return
(
return
(
<
View
style
=
{
styles
.
header
}
>
<
View
style
=
{
styles
.
header
}
>
<
DripIcon
navigate
=
{
this
.
props
.
navigate
}
/
>
<
Logo
/>
<
SideMenu
<
SideMenu
shouldShowMenu
=
{
shouldShowMenu
}
onPress
=
{
this
.
toggleMenu
}
/
>
shouldShowMenu
=
{
shouldShowMenu
}
onPress
=
{
this
.
toggleMenu
}
/
>
<
/View
>
<
/View
>
)
)
}
}
}
}
const
DripIcon
=
({
navigate
})
=>
{
return
(
<
TouchableOpacity
onPress
=
{()
=>
navigate
(
'
Home
'
)}
>
<
AppText
style
=
{
styles
.
icon
}
>
drip
.
<
/AppText
>
<
/TouchableOpacity
>
)
}
DripIcon
.
propTypes
=
{
navigate
:
PropTypes
.
func
.
isRequired
}
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
header
:
{
header
:
{
backgroundColor
:
Colors
.
purple
,
backgroundColor
:
Colors
.
purple
,
padding
:
Sizes
.
base
,
padding
:
Sizes
.
base
,
...
Containers
.
rowContainer
...
Containers
.
rowContainer
},
icon
:
{
color
:
Colors
.
tourquiseDark
,
fontFamily
:
Fonts
.
bold
,
fontSize
:
Sizes
.
title
}
}
})
})
\ No newline at end of file
const
mapDispatchToProps
=
(
dispatch
)
=>
{
return
({
navigate
:
(
page
)
=>
dispatch
(
navigate
(
page
)),
})
}
export
default
connect
(
null
,
mapDispatchToProps
,
)(
Header
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
components/header/logo.js
0 → 100644
+
41
−
0
View file @
bf4446c7
import
React
from
'
react
'
import
{
StyleSheet
,
TouchableOpacity
}
from
'
react-native
'
import
PropTypes
from
'
prop-types
'
import
AppText
from
'
../common/app-text
'
import
{
connect
}
from
'
react-redux
'
import
{
navigate
}
from
'
../../slices/navigation
'
import
{
Colors
,
Fonts
,
Sizes
}
from
'
../../styles/redesign
'
const
Logo
=
({
navigate
})
=>
{
return
(
<
TouchableOpacity
onPress
=
{()
=>
navigate
(
'
Home
'
)}
>
<
AppText
style
=
{
styles
.
logo
}
>
drip
.
<
/AppText
>
<
/TouchableOpacity
>
)
}
Logo
.
propTypes
=
{
navigate
:
PropTypes
.
func
.
isRequired
}
const
styles
=
StyleSheet
.
create
({
logo
:
{
color
:
Colors
.
tourquiseDark
,
fontFamily
:
Fonts
.
bold
,
fontSize
:
Sizes
.
title
}
})
const
mapDispatchToProps
=
(
dispatch
)
=>
{
return
({
navigate
:
(
page
)
=>
dispatch
(
navigate
(
page
)),
})
}
export
default
connect
(
null
,
mapDispatchToProps
,
)(
Logo
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment