Skip to content

Commit 206a3be

Browse files
committed
Bump version to 2.0.0-alpha-013
1 parent a59227f commit 206a3be

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

RELEASE_NOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### 2.0.0-alpha-013
2+
- added generic values support for `Picker` & `PickerItem`.
3+
14
### 2.0.0-alpha-012
25
- fixed `TransformsStyle.Transform`;
36
- added `deg` & `rad` functions to create values of `IAngle` type.

src/Fable.Helpers.ReactNative.fs

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,9 @@ module Props =
315315
type IAngle =
316316
interface end
317317

318+
type IPickerItem<'a> =
319+
inherit React.ReactElement
320+
318321
type IStyle =
319322
interface end
320323

@@ -363,7 +366,7 @@ module Props =
363366
type IDrawerLayoutAndroidProperties =
364367
interface end
365368

366-
type IPickerProperties =
369+
type IPickerProperties<'a> =
367370
interface end
368371

369372
type IProgressBarAndroidProperties =
@@ -473,7 +476,6 @@ module Props =
473476
inherit IActivityIndicatorIOSProperties
474477
inherit IDatePickerIOSProperties
475478
inherit IDrawerLayoutAndroidProperties
476-
inherit IPickerProperties
477479
inherit IProgressBarAndroidProperties
478480
inherit IProgressViewIOSProperties
479481
inherit IRefreshControlProperties
@@ -974,34 +976,34 @@ module Props =
974976
| Value of U2<string, int>
975977
| Label of string
976978

977-
type PickerItemProperties =
979+
type PickerItemProperties<'a> =
978980
| Label of string // REQUIRED!
979-
| Value of string
981+
| Value of 'a
980982
| Color of string
981983
| TestID of string
982984

983-
type PickerPropertiesIOS =
985+
type PickerPropertiesIOS<'a> =
984986
| ItemStyle of IStyle list
985-
interface IPickerProperties
987+
interface IPickerProperties<'a>
986988

987-
type PickerPropertiesAndroid =
989+
type PickerPropertiesAndroid<'a> =
988990
| Enabled of bool
989991
| Mode of Mode
990992
| Prompt of string
991-
interface IPickerProperties
993+
interface IPickerProperties<'a>
992994

993-
type PickerProperties =
994-
| OnValueChange of (string -> int -> unit)
995-
| SelectedValue of string
995+
type PickerProperties<'a> =
996+
| OnValueChange of ('a -> int -> unit)
997+
| SelectedValue of 'a
996998
| Style of IStyle list
997999
| TestId of string
9981000
| Ref of Ref<Picker>
999-
interface IPickerProperties
1001+
interface IPickerProperties<'a>
10001002

1001-
type PickerIOSProperties =
1003+
type PickerIOSProperties<'a> =
10021004
| ItemStyle of ViewStyle list
10031005
| Ref of Ref<PickerIOS>
1004-
interface IPickerProperties
1006+
interface IPickerProperties<'a>
10051007

10061008
module ProgressBar =
10071009
type ProgressBarAndroidProperties =
@@ -1565,7 +1567,7 @@ module Props =
15651567
interface IWebViewPropertiesIOS
15661568
interface IDatePickerIOSProperties
15671569
interface IDrawerLayoutAndroidProperties
1568-
interface IPickerProperties
1570+
interface IPickerProperties<'a>
15691571
interface IProgressBarAndroidProperties
15701572
interface IProgressViewIOSProperties
15711573
interface IRefreshControlProperties
@@ -1722,18 +1724,18 @@ let inline pickerIOSItem (props:Picker.PickerIOSItemProperties list) : React.Rea
17221724
RN.PickerIOS.Item,
17231725
props, [])
17241726

1725-
let inline pickerItem (props:Picker.PickerItemProperties list) : React.ReactElement =
1727+
let inline pickerItem<'a> (props:Picker.PickerItemProperties<'a> list) : IPickerItem<'a> =
17261728
createElement(
17271729
RN.Picker.Item,
17281730
props, [])
17291731

1730-
let inline picker (props:IPickerProperties list) (children:React.ReactElement list): React.ReactElement =
1732+
let inline picker (props:IPickerProperties<'a> list) (children:IPickerItem<'a> list): React.ReactElement =
17311733
createElement(
17321734
RN.Picker,
17331735
props,
1734-
children)
1736+
unbox<React.ReactElement list> children)
17351737

1736-
let inline pickerIOS (props:Picker.PickerIOSProperties list) (children:React.ReactElement list): React.ReactElement =
1738+
let inline pickerIOS (props:Picker.PickerIOSProperties<'a> list) (children:React.ReactElement list): React.ReactElement =
17371739
createElement(
17381740
RN.PickerIOS,
17391741
props,

src/Fable.React.Native.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Version>2.0.0</Version>
4-
<PackageVersion>2.0.0-alpha-012</PackageVersion>
4+
<PackageVersion>2.0.0-alpha-013</PackageVersion>
55
<TargetFramework>netstandard1.6</TargetFramework>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
</PropertyGroup>

0 commit comments

Comments
 (0)