build: convert touch-bar to typescript (#24511)

This commit is contained in:
Samuel Attard 2020-07-16 11:37:38 -07:00 committed by GitHub
parent 3f37ff87d2
commit 4c3da359fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 491 additions and 366 deletions

View file

@ -41,6 +41,10 @@ the button in the touch bar.
A `NativeImage` representing the button's current icon. Changing this value immediately updates the button
in the touch bar.
#### `touchBarButton.iconPosition`
A `String` - Can be `left`, `right` or `overlay`. Defaults to `overlay`.
#### `touchBarButton.enabled`
A `Boolean` representing whether the button is in an enabled state.

View file

@ -49,3 +49,7 @@ updates the control in the touch bar. Updating deep properties inside this array
An `Integer` representing the currently selected segment. Changing this value immediately updates the control
in the touch bar. User interaction with the touch bar will update this value automatically.
#### `touchBarSegmentedControl.mode`
A `String` representing the current selection mode of the control. Can be `single`, `multiple` or `buttons`.

View file

@ -11,3 +11,11 @@ Process: [Main](../tutorial/application-architecture.md#main-and-renderer-proces
* `small` - Small space between items. Maps to `NSTouchBarItemIdentifierFixedSpaceSmall`. This is the default.
* `large` - Large space between items. Maps to `NSTouchBarItemIdentifierFixedSpaceLarge`.
* `flexible` - Take up all available space. Maps to `NSTouchBarItemIdentifierFlexibleSpace`.
### Instance Properties
The following properties are available on instances of `TouchBarSpacer`:
#### `touchBarSpacer.size`
A `String` representing the size of the spacer. Can be `small`, `large` or `flexible`.