From f97ee56c9f458cd29744c1dae339721f3ec372a3 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Sat, 4 Mar 2017 16:14:41 +1100 Subject: [PATCH] Add more explicit types to docs for TouchBar --- docs/api/touch-bar-button.md | 6 +++--- docs/api/touch-bar-color-picker.md | 5 +++-- docs/api/touch-bar-label.md | 4 ++-- docs/api/touch-bar-popover.md | 4 ++-- docs/api/touch-bar-slider.md | 9 +++++---- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/docs/api/touch-bar-button.md b/docs/api/touch-bar-button.md index 018c267f300d..30f7033caff2 100644 --- a/docs/api/touch-bar-button.md +++ b/docs/api/touch-bar-button.md @@ -19,15 +19,15 @@ The following properties are available on instances of `TouchBarButton`: #### `touchBarButton.label` -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` -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` -The button's current icon. Changing this value immediately updates the button +A `NativeImage` representing the button's current icon. Changing this value immediately updates the button in the touch bar. diff --git a/docs/api/touch-bar-color-picker.md b/docs/api/touch-bar-color-picker.md index 42a2ace22b94..98512fa6da3a 100644 --- a/docs/api/touch-bar-color-picker.md +++ b/docs/api/touch-bar-color-picker.md @@ -12,6 +12,7 @@ Process: [Main](../tutorial/quick-start.md#main-process) * `selectedColor` String (optional) - The selected hex color in the picker, i.e `#ABCDEF`. * `change` Function (optional) - Function to call when a color is selected. + * `color` String - The color that the user selected from the picker ### Instance Properties @@ -19,10 +20,10 @@ The following properties are available on instances of `TouchBarColorPicker`: #### `touchBarColorPicker.availableColors` -The color picker's available colors to select. Changing this value immediately +A `String[]` array representing the color picker's available colors to select. Changing this value immediately updates the color picker in the touch bar. #### `touchBarColorPicker.selectedColor` -The color picker's currently selected color. Changing this value immediately +A `String` hex code representing the color picker's currently selected color. Changing this value immediately updates the color picker in the touch bar. diff --git a/docs/api/touch-bar-label.md b/docs/api/touch-bar-label.md index 4caecb6a46a3..c81403b80dab 100644 --- a/docs/api/touch-bar-label.md +++ b/docs/api/touch-bar-label.md @@ -16,10 +16,10 @@ The following properties are available on instances of `TouchBarLabel`: #### `touchBarLabel.label` -The label's current text. Changing this value immediately updates the label in +A `String` representing the label's current text. Changing this value immediately updates the label in the touch bar. #### `touchBarLabel.textColor` -The label's current text color. Changing this value immediately updates the +A `String` hex code representing the label's current text color. Changing this value immediately updates the label in the touch bar. diff --git a/docs/api/touch-bar-popover.md b/docs/api/touch-bar-popover.md index d065da05e141..231a68c43d3b 100644 --- a/docs/api/touch-bar-popover.md +++ b/docs/api/touch-bar-popover.md @@ -19,10 +19,10 @@ The following properties are available on instances of `TouchBarPopover`: #### `touchBarPopover.label` -The popover's current button text. Changing this value immediately updates the +A `String` representing the popover's current button text. Changing this value immediately updates the popover in the touch bar. #### `touchBarPopover.icon` -The popover's current button icon. Changing this value immediately updates the +A `NativeImage` representing the popover's current button icon. Changing this value immediately updates the popover in the touch bar. diff --git a/docs/api/touch-bar-slider.md b/docs/api/touch-bar-slider.md index 1be9b45716d9..5d9bce01ccb3 100644 --- a/docs/api/touch-bar-slider.md +++ b/docs/api/touch-bar-slider.md @@ -12,6 +12,7 @@ Process: [Main](../tutorial/quick-start.md#main-process) * `minValue` Integer (optional) - Minimum value. * `maxValue` Integer (optional) - Maximum value. * `change` Function (optional) - Function to call when the slider is changed. + * `newValue` Number - The value that the user selected on the Slider ### Instance Properties @@ -19,20 +20,20 @@ The following properties are available on instances of `TouchBarSlider`: #### `touchBarSlider.label` -The slider's current text. Changing this value immediately updates the slider +A `String` representing the slider's current text. Changing this value immediately updates the slider in the touch bar. #### `touchBarSlider.value` -The slider's current value. Changing this value immediately updates the slider +A `Number` representing the slider's current value. Changing this value immediately updates the slider in the touch bar. #### `touchBarSlider.minValue` -The slider's current minimum value. Changing this value immediately updates the +A `Number` representing the slider's current minimum value. Changing this value immediately updates the slider in the touch bar. #### `touchBarSlider.maxValue` -The slider's current maximum value. Changing this value immediately updates the +A `Number` representing the slider's current maximum value. Changing this value immediately updates the slider in the touch bar.