Skip to content

update docs for 0.4.x #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 57 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ React Native bindings.

is an alias for `React.Ref.t(Js.nullable(element))`.

### Props
### CheckBox common props

All props are optional.

Expand All @@ -77,11 +77,6 @@ All props are optional.
Value of the checkbox. When `true`, checkbox will be checked. Default value is
`false`.

#### `disabled: bool`

When `true`, user will not be able to toggle the checkbox. Default value is
`false`.

#### `onChange: checkBoxEvent => unit`

Returns a [native event](#checkBoxEvent).
Expand All @@ -90,16 +85,71 @@ Returns a [native event](#checkBoxEvent).

Returns the new `bool` value.

#### `testID: string`

Used to locate this view in end-to-end tests.

### CheckBox Android props

#### `disabled: bool`

When `true`, user will not be able to toggle the checkbox. Default value is
`false`.

#### `tintColors`

```reason
tintColors:
(~_true: ReactNative.Color.t=?, ~_false: ReactNative.Color.t=?, unit) => tintColors
(~_true: int=?, ~_false: int=?, unit) => tintColors
```

Value for `_true` will be used when the checkbox is checked, and value for
`_false` will be used when it is not checked.

### CheckBox iOS props

#### `lineWidth: float`

The width of the lines of the check mark and box. Defaults to `2.0`.

#### `hideBox: bool`

Control if the box should be hidden or not. Defaults to `false`

#### `` boxType: `circle or `square ``

The type of box to use. Defaults to `` `circle ``

#### `tintColor: Color.t`

The color of the box when the checkbox is Off. Defaults to `#aaaaaa`

#### `onCheckColor: Color.t`

The color of the check mark when it is On. Defaults to `#007aff`

#### `onFillColor: Color.t`

The color of the inside of the box when it is On. Defaults to transparent

#### `onTintColor: Color.t`

The color of the line around the box when it is On. Defaults to `#007aff`

#### `animationDuration: float`

The duration in seconds of the animations. Defaults to 0.5

#### `` onAnimationType: `stroke or `fill or `bounce or `flat or `oneStroke or `fade ``

The type of animation to use when the checkbox gets checked. Defaults to
`` `stroke ``

#### `` offAnimationType: `stroke or `fill or `bounce or `flat or `oneStroke or `fade ``

The type of animation to use when the checkbox gets unchecked. Defaults to
`` `stroke ``

### `View` props

Refer to
Expand Down