Skip to content

Commit a263a3b

Browse files
authored
docs: update pressable.md after adding PlatformColor and alpha support (facebook#5049)
1 parent 0892fa6 commit a263a3b

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

docs/pressable.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ If true, doesn't play Android system sound on press.
122122

123123
### `android_ripple` <div className="label android">Android</div>
124124

125-
Enables the Android ripple effect and configures its properties.
125+
Enables the Android ripple effect and configures its properties. The `color` field accepts both plain colors and [`PlatformColor`](platformcolor) values, so you can reference theme attributes like `?attr/colorAccent`. When a `PlatformColor` is used, the ripple is automatically updated when the system configuration changes (for example, when switching between light and dark mode).
126126

127127
| Type |
128128
| -------------------------------------- |
@@ -260,9 +260,10 @@ Ripple effect configuration for the `android_ripple` property.
260260

261261
**Properties:**
262262

263-
| Name | Type | Required | Description |
264-
| ---------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
265-
| color | [color](colors) | No | Defines the color of the ripple effect. |
266-
| borderless | boolean | No | Defines if ripple effect should not include border. |
267-
| radius | number | No | Defines the radius of the ripple effect. |
268-
| foreground | boolean | No | Set to true to add the ripple effect to the foreground of the view, instead of the background. This is useful if one of your child views has a background of its own, or you're e.g. displaying images, and you don't want the ripple to be covered by them. |
263+
| Name | Type | Required | Description |
264+
| ---------- | ------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
265+
| color | [color](colors) or [PlatformColor](platformcolor) | No | Defines the color of the ripple effect. |
266+
| borderless | boolean | No | Defines if ripple effect should not include border. |
267+
| radius | number | No | Defines the radius of the ripple effect. |
268+
| foreground | boolean | No | Set to true to add the ripple effect to the foreground of the view, instead of the background. This is useful if one of your child views has a background of its own, or you're e.g. displaying images, and you don't want the ripple to be covered by them. |
269+
| alpha | number | No | Controls the opacity of the ripple. Accepts a value between `0.0` (fully transparent) and `1.0` (fully opaque). The value is applied on top of any alpha already present in the color. |

0 commit comments

Comments
 (0)