Add initial touch bar docs
This commit is contained in:
parent
81ecd4499c
commit
002369576f
11 changed files with 280 additions and 35 deletions
28
docs/api/touch-bar-color-picker.md
Normal file
28
docs/api/touch-bar-color-picker.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
## Class: TouchBarColorPicker
|
||||
|
||||
> Create a color picker in the touch bar for native macOS applications
|
||||
|
||||
Process: [Main](../tutorial/quick-start.md#main-process)
|
||||
|
||||
### `new TouchBarColorPicker(options)`
|
||||
|
||||
* `options` Object
|
||||
* `availableColors` String[] (optional) - Array of hex color strings to
|
||||
appear as possible colors to select.
|
||||
* `selectedColor` String (optional) - The selected hex color in the picker,
|
||||
i.e `#ABCDEF`.
|
||||
* `change` Function (optional) - Function to call when a color is selected.
|
||||
|
||||
### Instance Properties
|
||||
|
||||
The following properties are available on instances of `TouchBarColorPicker`:
|
||||
|
||||
#### `touchBarColorPicker.availableColors`
|
||||
|
||||
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
|
||||
updates the color picker in the touch bar.
|
Loading…
Add table
Add a link
Reference in a new issue