Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-picker
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
react-native-picker
Commits
034044eb
Commit
034044eb
authored
Feb 03, 2016
by
xwenliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add style for picker
parent
90451c37
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
README.md
README.md
+1
-0
index.js
index.js
+3
-1
package.json
package.json
+1
-1
No files found.
README.md
View file @
034044eb
...
...
@@ -22,6 +22,7 @@ Needs react-native >= 0.14.2
###Documentation
####Props
-
<b>
style
</b>
style of picker
-
<b>
pickerBtnText
</b>
string, tool bar's confirm btn text
-
<b>
pickerCancelBtnText
</b>
string, tool bar's cancel ben text
-
<b>
pickerBtnStyle
</b>
textStylePropType, tool bar's btn style
...
...
index.js
View file @
034044eb
...
...
@@ -70,6 +70,7 @@ export default class PickerAny extends React.Component {
_getStateFromProps
(
props
){
//the pickedValue must looks like [wheelone's, wheeltwo's, ...]
//this.state.selectedValue may be the result of the first pickerWheel
let
style
=
props
.
style
;
let
pickerBtnText
=
props
.
pickerBtnText
;
let
pickerCancelBtnText
=
props
.
pickerCancelBtnText
;
let
pickerBtnStyle
=
props
.
pickerBtnStyle
;
...
...
@@ -116,6 +117,7 @@ export default class PickerAny extends React.Component {
this
.
pickedValue
=
JSON
.
parse
(
JSON
.
stringify
(
selectedValue
));
this
.
pickerStyle
=
pickerStyle
;
return
{
style
,
pickerBtnText
,
pickerCancelBtnText
,
pickerBtnStyle
,
...
...
@@ -458,7 +460,7 @@ export default class PickerAny extends React.Component {
<
Animated
.
View
style
=
{[
styles
.
picker
,
{
height
:
this
.
state
.
pickerHeight
,
bottom
:
this
.
state
.
slideAnim
}]}
>
}
,
this
.
state
.
style
]}
>
<
View
style
=
{[
styles
.
pickerToolbar
,
this
.
state
.
pickerToolBarStyle
]}
>
<
View
style
=
{
styles
.
pickerCancelBtn
}
>
<
Text
style
=
{[
styles
.
pickerFinishBtnText
,
this
.
state
.
pickerBtnStyle
]}
...
...
package.json
View file @
034044eb
{
"name"
:
"react-native-picker"
,
"version"
:
"0.4.
0
"
,
"version"
:
"0.4.
1
"
,
"description"
:
"react-native-picker"
,
"main"
:
"index.js"
,
"scripts"
:
{
...
...
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