Skip to content

Commit

Permalink
Merge pull request #38 from kevkov/main
Browse files Browse the repository at this point in the history
Fix ImageButton CornerRadius type #37
  • Loading branch information
TimLariviere committed Jun 30, 2023
2 parents 0514a6b + baf7ec2 commit 62d7930
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions docs/v2/apis/controls/image-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ For details on how the control actually works, please refer to the [Xamarin.Form

## Properties

| Properties | Description |
|--|--|
| borderColor(light: FabColor, ?dark: FabColor) | Sets the border color |
| borderWidth(value: float) | Sets the border width |
| cornerRadius(value: float) | Sets the corner radius |
| isLoading(value: bool) | Sets if the image is currently loading |
| isOpaque(value: bool) | Sets if the image is opaque |
| isPressed(value: bool) | Sets if the image is currently pressed |
| padding(value: Thickness) | Sets the padding |
| padding(value: float) | Sets a uniform padding |
| Properties | Description |
|---------------------------------------------------------------|--|
| borderColor(light: FabColor, ?dark: FabColor) | Sets the border color |
| borderWidth(value: float) | Sets the border width |
| cornerRadius(value: int) | Sets the corner radius |
| isLoading(value: bool) | Sets if the image is currently loading |
| isOpaque(value: bool) | Sets if the image is opaque |
| isPressed(value: bool) | Sets if the image is currently pressed |
| padding(value: Thickness) | Sets the padding |
| padding(value: float) | Sets a uniform padding |
| padding(left: float, top: float, right: float, bottom: float) | Sets the padding |
| reference(value: ViewRef<ImageButton>) | Sets a `ViewRef` instance to retrieve the `Xamarin.Forms.ImageButton` instance associated to this widget |
| reference(value: ViewRef<ImageButton>) | Sets a `ViewRef` instance to retrieve the `Xamarin.Forms.ImageButton` instance associated to this widget |

## Events

Expand Down
4 changes: 2 additions & 2 deletions src/Fabulous.XamarinForms/Views/Controls/ImageButton.fs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module ImageButton =

let BorderWidth = Attributes.defineBindableFloat ImageButton.BorderWidthProperty

let CornerRadius = Attributes.defineBindableFloat ImageButton.CornerRadiusProperty
let CornerRadius = Attributes.defineBindableInt ImageButton.CornerRadiusProperty

let IsLoading = Attributes.defineBindableBool ImageButton.IsLoadingProperty

Expand Down Expand Up @@ -103,7 +103,7 @@ type ImageButtonModifiers =
/// <summary>Set the corner radius of the image button</summary>
/// <param name="radius">The corner radius of the image button.</param>
[<Extension>]
static member inline cornerRadius(this: WidgetBuilder<'msg, #IImageButton>, value: float) =
static member inline cornerRadius(this: WidgetBuilder<'msg, #IImageButton>, value: int) =
this.AddScalar(ImageButton.CornerRadius.WithValue(value))

[<Extension>]
Expand Down

0 comments on commit 62d7930

Please sign in to comment.