docs: type names changed from wrapper to primitive (#31752)

This commit is contained in:
Milan Burda 2021-11-16 05:13:18 +01:00 committed by GitHub
parent 246884c4fb
commit e6b1d95a1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
115 changed files with 1685 additions and 1685 deletions

View file

@ -8,14 +8,14 @@ _This class is not exported from the `'electron'` module. It is only available a
### `new TouchBarButton(options)`
* `options` Object
* `label` String (optional) - Button text.
* `accessibilityLabel` String (optional) - A short description of the button for use by screenreaders like VoiceOver.
* `backgroundColor` String (optional) - Button background color in hex format,
* `label` string (optional) - Button text.
* `accessibilityLabel` string (optional) - A short description of the button for use by screenreaders like VoiceOver.
* `backgroundColor` string (optional) - Button background color in hex format,
i.e `#ABCDEF`.
* `icon` [NativeImage](native-image.md) | String (optional) - Button icon.
* `iconPosition` String (optional) - Can be `left`, `right` or `overlay`. Defaults to `overlay`.
* `icon` [NativeImage](native-image.md) | string (optional) - Button icon.
* `iconPosition` string (optional) - Can be `left`, `right` or `overlay`. Defaults to `overlay`.
* `click` Function (optional) - Function to call when the button is clicked.
* `enabled` Boolean (optional) - Whether the button is in an enabled state. Default is `true`.
* `enabled` boolean (optional) - Whether the button is in an enabled state. Default is `true`.
When defining `accessibilityLabel`, ensure you have considered macOS [best practices](https://developer.apple.com/documentation/appkit/nsaccessibilitybutton/1524910-accessibilitylabel?language=objc).
@ -25,16 +25,16 @@ The following properties are available on instances of `TouchBarButton`:
#### `touchBarButton.accessibilityLabel`
A `String` representing the description of the button to be read by a screen reader. Will only be read by screen readers if no label is set.
A `string` representing the description of the button to be read by a screen reader. Will only be read by screen readers if no label is set.
#### `touchBarButton.label`
A `String` representing the button's current text. Changing this value immediately updates the button
A `string` representing the button's current text. Changing this value immediately updates the button
in the touch bar.
#### `touchBarButton.backgroundColor`
A `String` hex code representing the button's current background color. Changing this value immediately updates
A `string` hex code representing the button's current background color. Changing this value immediately updates
the button in the touch bar.
#### `touchBarButton.icon`
@ -44,8 +44,8 @@ in the touch bar.
#### `touchBarButton.iconPosition`
A `String` - Can be `left`, `right` or `overlay`. Defaults to `overlay`.
A `string` - Can be `left`, `right` or `overlay`. Defaults to `overlay`.
#### `touchBarButton.enabled`
A `Boolean` representing whether the button is in an enabled state.
A `boolean` representing whether the button is in an enabled state.