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
fb519c43
Commit
fb519c43
authored
4 years ago
by
mashazyu
Committed by
Sofiya Tepikin
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Moves unique styles of Segment component from common files to local one
parent
78d4077f
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
components/common/segment.js
+18
-6
18 additions, 6 deletions
components/common/segment.js
styles/containers.js
+1
-10
1 addition, 10 deletions
styles/containers.js
styles/redesign.js
+3
-2
3 additions, 2 deletions
styles/redesign.js
styles/typography.js
+10
-18
10 additions, 18 deletions
styles/typography.js
with
32 additions
and
36 deletions
components/common/segment.js
+
18
−
6
View file @
fb519c43
...
@@ -4,7 +4,7 @@ import { StyleSheet, View } from 'react-native'
...
@@ -4,7 +4,7 @@ import { StyleSheet, View } from 'react-native'
import
AppText
from
'
./app-text
'
import
AppText
from
'
./app-text
'
import
{
Co
ntainer
s
,
Typography
}
from
'
../../styles/redesign
'
import
{
Co
lors
,
Spacing
,
Size
s
,
Typography
}
from
'
../../styles/redesign
'
const
Segment
=
({
children
,
last
,
title
})
=>
{
const
Segment
=
({
children
,
last
,
title
})
=>
{
const
containerStyle
=
last
?
styles
.
containerLast
:
styles
.
container
const
containerStyle
=
last
?
styles
.
containerLast
:
styles
.
container
...
@@ -23,17 +23,29 @@ Segment.propTypes = {
...
@@ -23,17 +23,29 @@ Segment.propTypes = {
title
:
PropTypes
.
string
title
:
PropTypes
.
string
}
}
const
bottomBorder
=
{
borderStyle
:
'
solid
'
,
borderBottomWidth
:
2
,
borderBottomColor
:
Colors
.
grey
,
paddingBottom
:
Spacing
.
base
}
const
segmentContainer
=
{
marginHorizontal
:
Spacing
.
base
,
marginBottom
:
Spacing
.
base
,
}
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
container
:
{
container
:
{
...
Containers
.
segmentContainer
,
...
segmentContainer
,
...
Containers
.
bottomBorder
...
bottomBorder
},
},
containerLast
:
{
containerLast
:
{
...
Containers
.
segmentContainer
,
...
segmentContainer
...
Containers
.
marginBottom
},
},
title
:
{
title
:
{
...
Typography
.
titleSmall
fontSize
:
Sizes
.
subtitle
,
...
Typography
.
title
}
}
})
})
...
...
This diff is collapsed.
Click to expand it.
styles/containers.js
+
1
−
10
View file @
fb519c43
import
Colors
from
'
./colors
'
import
Colors
from
'
./colors
'
import
Spacing
from
'
./spacing
'
export
default
{
export
default
{
bottomBorder
:
{
borderStyle
:
'
solid
'
,
borderBottomWidth
:
2
,
borderBottomColor
:
Colors
.
grey
,
paddingBottom
:
Spacing
.
base
},
centerItems
:
{
centerItems
:
{
alignItems
:
'
center
'
,
alignItems
:
'
center
'
,
flex
:
1
,
flex
:
1
,
...
@@ -19,7 +12,6 @@ export default {
...
@@ -19,7 +12,6 @@ export default {
borderStyle
:
'
solid
'
,
borderStyle
:
'
solid
'
,
borderWidth
:
1
,
borderWidth
:
1
,
},
},
marginBottom
:
{
marginBottom
:
Spacing
.
base
},
orangeButton
:
{
orangeButton
:
{
backgroundColor
:
Colors
.
orange
,
backgroundColor
:
Colors
.
orange
,
borderRadius
:
25
borderRadius
:
25
...
@@ -27,6 +19,5 @@ export default {
...
@@ -27,6 +19,5 @@ export default {
page
:
{
page
:
{
backgroundColor
:
Colors
.
tourquiseLight
,
backgroundColor
:
Colors
.
tourquiseLight
,
flex
:
1
flex
:
1
},
}
segmentContainer
:
{
marginHorizontal
:
Spacing
.
base
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
styles/redesign.js
+
3
−
2
View file @
fb519c43
import
Colors
from
'
./colors
'
import
Colors
from
'
./colors
'
import
Containers
from
'
./containers
'
import
Containers
from
'
./containers
'
import
Typography
from
'
./typography
'
import
Spacing
from
'
./spacing
'
import
Typography
,
{
sizes
as
Sizes
}
from
'
./typography
'
export
{
Colors
,
Containers
,
Typography
}
export
{
Colors
,
Containers
,
Spacing
,
Sizes
,
Typography
}
This diff is collapsed.
Click to expand it.
styles/typography.js
+
10
−
18
View file @
fb519c43
...
@@ -6,12 +6,10 @@ const fonts = {
...
@@ -6,12 +6,10 @@ const fonts = {
bold
:
'
Jost-700-Bold
'
,
bold
:
'
Jost-700-Bold
'
,
}
}
const
sizes
=
{
export
const
sizes
=
{
mainMedium
:
18
,
base
:
18
,
mainLarge
:
20
,
subtitle
:
22
,
titleSmall
:
22
,
title
:
24
titleMedium
:
24
,
titleLarge
:
28
}
}
const
button
=
{
const
button
=
{
...
@@ -20,12 +18,6 @@ const button = {
...
@@ -20,12 +18,6 @@ const button = {
textTransform
:
'
uppercase
'
textTransform
:
'
uppercase
'
}
}
const
title
=
{
color
:
Colors
.
purple
,
marginHorizontal
:
Spacing
.
base
,
marginVertical
:
Spacing
.
large
}
export
default
{
export
default
{
buttonTextBold
:
{
buttonTextBold
:
{
fontFamily
:
fonts
.
bold
,
fontFamily
:
fonts
.
bold
,
...
@@ -37,18 +29,18 @@ export default {
...
@@ -37,18 +29,18 @@ export default {
},
},
mainText
:
{
mainText
:
{
fontFamily
:
fonts
.
main
,
fontFamily
:
fonts
.
main
,
fontSize
:
sizes
.
mainMedium
fontSize
:
sizes
.
base
},
},
pageTitle
:
{
pageTitle
:
{
alignSelf
:
'
center
'
,
alignSelf
:
'
center
'
,
fontFamily
:
fonts
.
bold
,
fontFamily
:
fonts
.
bold
,
fontWeight
:
'
700
'
,
fontWeight
:
'
700
'
,
fontSize
:
sizes
.
title
Medium
,
fontSize
:
sizes
.
title
,
...
title
marginHorizontal
:
Spacing
.
base
,
},
},
title
Small
:
{
title
:
{
fontSize
:
sizes
.
titleSmall
,
color
:
Colors
.
purple
,
...
titl
e
marginVertical
:
Spacing
.
larg
e
},
},
underline
:
{
textDecorationLine
:
'
underline
'
}
underline
:
{
textDecorationLine
:
'
underline
'
}
}
}
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