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
842e8a2a
Commit
842e8a2a
authored
4 years ago
by
mashazyu
Committed by
Sofiya Tepikin
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Introduces AppTextInput and Button components styling update
parent
c090e148
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/common/app-text-input.js
+8
-27
8 additions, 27 deletions
components/common/app-text-input.js
components/common/button.js
+13
-6
13 additions, 6 deletions
components/common/button.js
with
21 additions
and
33 deletions
components/common/app-text-input.js
+
8
−
27
View file @
842e8a2a
import
React
from
'
react
'
import
PropTypes
from
'
prop-types
'
import
{
StyleSheet
,
TextInput
}
from
'
react-native
'
import
{
Colors
}
from
'
../../styles/redesign
'
import
{
Colors
,
Spacing
,
Typography
}
from
'
../../styles/redesign
'
const
AppTextInput
=
({
autoFocus
,
onChangeText
,
placeholder
,
value
,
...
props
})
=>
{
return
(
<
TextInput
autoFocus
=
{
autoFocus
}
onChangeText
=
{
onChangeText
}
placeholder
=
{
placeholder
}
style
=
{
styles
.
input
}
value
=
{
value
}
{...
props
}
/
>
)
}
AppTextInput
.
propTypes
=
{
autoFocus
:
PropTypes
.
bool
,
onChangeText
:
PropTypes
.
func
,
placeholder
:
PropTypes
.
string
,
value
:
PropTypes
.
string
,
const
AppTextInput
=
({
...
props
})
=>
{
return
<
TextInput
style
=
{
styles
.
input
}
{...
props
}
/
>
}
const
styles
=
StyleSheet
.
create
({
input
:
{
backgroundColor
:
'
white
'
,
borderColor
:
Colors
.
grey
,
borderRadius
:
5
,
borderStyle
:
'
solid
'
,
borderWidth
:
1
,
color
:
Colors
.
greyDark
,
marginTop
:
Spacing
.
base
,
paddingHorizontal
:
Spacing
.
base
,
...
Typography
.
mainText
}
})
...
...
This diff is collapsed.
Click to expand it.
components/common/button.js
+
13
−
6
View file @
842e8a2a
...
...
@@ -6,9 +6,11 @@ import AppText from './app-text'
import
{
Colors
,
Fonts
,
Spacing
}
from
'
../../styles/redesign
'
const
Button
=
({
children
,
isCTA
,
onPress
,
testID
})
=>
{
const
Button
=
({
children
,
isCTA
,
isSmall
,
onPress
,
testID
})
=>
{
const
buttonStyle
=
isCTA
?
styles
.
cta
:
styles
.
regular
const
textStyle
=
isCTA
?
styles
.
buttonTextBold
:
styles
.
buttonTextRegular
const
textCTA
=
isCTA
?
styles
.
buttonTextBold
:
styles
.
buttonTextRegular
const
textStyle
=
isSmall
?
[
textCTA
,
textSmall
]
:
[
textCTA
,
text
]
return
(
<
TouchableOpacity
onPress
=
{
onPress
}
style
=
{
buttonStyle
}
testID
=
{
testID
}
>
<
AppText
style
=
{
textStyle
}
>
{
children
}
<
/AppText
>
...
...
@@ -19,6 +21,7 @@ const Button = ({ children, isCTA, onPress, testID }) => {
Button
.
propTypes
=
{
children
:
PropTypes
.
node
,
isCTA
:
PropTypes
.
bool
,
isSmall
:
PropTypes
.
bool
,
onPress
:
PropTypes
.
func
,
testID
:
PropTypes
.
string
}
...
...
@@ -28,6 +31,12 @@ const text = {
textTransform
:
'
uppercase
'
}
const
textSmall
=
{
fontSize
:
Fonts
.
small
,
padding
:
Spacing
.
small
,
textTransform
:
'
uppercase
'
}
const
button
=
{
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
...
...
@@ -45,13 +54,11 @@ const styles = StyleSheet.create({
},
buttonTextBold
:
{
color
:
'
white
'
,
fontFamily
:
Fonts
.
bold
,
...
text
fontFamily
:
Fonts
.
bold
},
buttonTextRegular
:
{
color
:
Colors
.
greyDark
,
fontFamily
:
Fonts
.
main
,
...
text
fontFamily
:
Fonts
.
main
}
})
...
...
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