Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evanbacon/expo-touch-bar-example
Example of creating a custom button in the touch bar using Expo/Electron
https://github.com/evanbacon/expo-touch-bar-example
electron expo react-native touch-bar
Last synced: 2 months ago
JSON representation
Example of creating a custom button in the touch bar using Expo/Electron
- Host: GitHub
- URL: https://github.com/evanbacon/expo-touch-bar-example
- Owner: EvanBacon
- Created: 2020-02-28T02:10:10.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-12T22:54:37.000Z (over 3 years ago)
- Last Synced: 2024-05-02T02:19:18.954Z (8 months ago)
- Topics: electron, expo, react-native, touch-bar
- Language: JavaScript
- Homepage:
- Size: 2.24 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# expo-touch-bar-example
Example of creating a custom button in the touch bar using Expo/Electron- `expo init myProject`
- `npx @expo/electron-adapter`
- `yarn expo-electron customize`
- `yarn add react-touchbar-electron`- Modify `electron/main/index.js`
```diff
+ import { touchBarWrapper } from 'react-touchbar-electron';function createMainWindow() {
const browserWindow = new BrowserWindow({ webPreferences: { nodeIntegration: true } });
+ touchBarWrapper(browserWindow);```
- Modify `App.js`
```diff
import React from 'react';
import { Text, View } from 'react-native';
+ import { TouchBarProvider, Button, TouchBar } from 'react-touchbar-electron';function App() {
return (
+
+ {}} />
+
Open up App.js to start working on your app!
);
}+ export default () =>
```