birkir / react-native-carplay

CarPlay with React Native
https://birkir.dev/react-native-carplay/
MIT License
628 stars 104 forks source link

Not able to set tab title property #144

Closed drgrey87 closed 9 months ago

drgrey87 commented 9 months ago

I don't see any properties to add tab title to tab bar template.

As you see 2 "More" tabs there, also should titles be displayed in a listTemplate?:

Screenshot 2023-10-04 at 12 33 34
const template1 = new ListTemplate({
  sections: [
    {
      header: 'Test 1',
      items: [{ text: 'Hello world 1' }],
    },
  ],
  title: 'AA',
});
const template2 = new ListTemplate({
  sections: [
    {
      header: 'Test 2',
      items: [{ text: 'Hello world 3' }],
    },
  ],
  title: 'BB',
});

const tabBarTemplate = new TabBarTemplate({
  templates: [template1, template2],
  onTemplateSelect(e: any) {
    console.log('selected', e);
  },
});

CarPlay.setRootTemplate(tabBarTemplate);

"react-native-carplay": "^2.3.0"

System: OS: macOS 13.3.1 CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz Memory: 115.96 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.18.0/bin/yarn npm: 9.1.2 - ~/.nvm/versions/node/v16.18.0/bin/npm Watchman: Not Found Managers: CocoaPods: 1.12.0 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4 Android SDK: API Levels: 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 Build Tools: 24.0.3, 25.0.3, 26.0.3, 27.0.3, 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 33.0.0, 34.0.0 System Images: android-24 | Intel x86 Atom_64, android-25 | Intel x86 Atom_64, android-26 | Intel x86 Atom_64, android-27 | Intel x86 Atom_64, android-28 | Intel x86 Atom_64, android-29 | Intel x86 Atom_64, android-30 | Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom, android-31 | Google APIs Intel x86_64 Atom, android-32 | Google APIs Intel x86_64 Atom, android-33 | Google APIs Intel x86_64 Atom, android-34 | Google APIs Intel x86_64 Atom Android NDK: Not Found IDEs: Android Studio: 2022.2 AI-222.4459.24.2221.10121639 Xcode: 14.3/14E222b - /usr/bin/xcodebuild Languages: Java: 20.0.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.8 => 0.71.8 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found