-
Notifications
You must be signed in to change notification settings - Fork 5.3k
update TV-related props, improve docs formatting #4802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ title: Button | |
|
||
A basic button component that should render nicely on any platform. Supports a minimal level of customization. | ||
|
||
If this button doesn't look right for your app, you can build your own button using [Pressable](pressable). For inspiration, look at the [source code for the Button component](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/Button.js). | ||
If this button doesn't look right for your app, you can build your own button using [`Pressable`](pressable). For inspiration, look at the [source code for the `Button` component](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/Button.js). | ||
|
||
```tsx | ||
<Button | ||
|
@@ -212,7 +212,11 @@ If `true`, disable all interactions for this component. | |
|
||
--- | ||
|
||
### `hasTVPreferredFocus` <div className="label tv">TV</div> | ||
### `hasTVPreferredFocus` <div className="label ios">tvOS</div> | ||
|
||
:::warning Deprecated | ||
Use [`focusable` prop](view#focusable) form `View` instead. | ||
|
||
::: | ||
|
||
TV preferred focus. | ||
|
||
|
@@ -222,7 +226,7 @@ TV preferred focus. | |
|
||
--- | ||
|
||
### `nextFocusDown` <div className="label android">Android</div><div className="label tv">TV</div> | ||
### `nextFocusDown` <div className="label android">Android TV</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the TV repo, this prop (and nextFocusUp, nextFocusLeft, nextFocusRight) are supported on both Apple TV and Android TV. I believe nextFocusForward is only on Android. |
||
|
||
Designates the next view to receive focus when the user navigates down. See the [Android documentation](https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusDown). | ||
|
||
|
@@ -232,7 +236,7 @@ Designates the next view to receive focus when the user navigates down. See the | |
|
||
--- | ||
|
||
### `nextFocusForward` <div className="label android">Android</div><div className="label tv">TV</div> | ||
### `nextFocusForward` <div className="label android">Android TV</div> | ||
|
||
Designates the next view to receive focus when the user navigates forward. See the [Android documentation](https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusForward). | ||
|
||
|
@@ -242,7 +246,7 @@ Designates the next view to receive focus when the user navigates forward. See t | |
|
||
--- | ||
|
||
### `nextFocusLeft` <div className="label android">Android</div><div className="label tv">TV</div> | ||
### `nextFocusLeft` <div className="label android">Android TV</div> | ||
|
||
Designates the next view to receive focus when the user navigates left. See the [Android documentation](https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusLeft). | ||
|
||
|
@@ -252,7 +256,7 @@ Designates the next view to receive focus when the user navigates left. See the | |
|
||
--- | ||
|
||
### `nextFocusRight` <div className="label android">Android</div><div className="label tv">TV</div> | ||
### `nextFocusRight` <div className="label android">Android TV</div> | ||
|
||
Designates the next view to receive focus when the user navigates right. See the [Android documentation](https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusRight). | ||
|
||
|
@@ -262,7 +266,7 @@ Designates the next view to receive focus when the user navigates right. See the | |
|
||
--- | ||
|
||
### `nextFocusUp` <div className="label android">Android</div><div className="label tv">TV</div> | ||
### `nextFocusUp` <div className="label android">Android TV</div> | ||
|
||
Designates the next view to receive focus when the user navigates up. See the [Android documentation](https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusUp). | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the TV repo, this prop is supported on both Apple TV and Android TV.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @douglowder, after discussing it with @cortinico, looks like want to keep the docs as close to the core repo code (no other out-of-tree platform specific props or prop changes are listed in the docs).
If you have a website or doc where we can redirect people interested in TV platforms let me know. We can add a link to the page which have a better/more detailed information for TV usage.
Also, if you think that those platform annotations are incorrect in the core repo code, please create a PR addressing that, and we can follow up with docs correction, if it gets merged.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, if you need a help with setting up TV platforms website LMK, let's talk on Discord 🙂