Skip to content

Commit fc0d037

Browse files
authored
convert quote blocks to admonitions, cleanup removed APIs pages (#4757)
1 parent f2ff559 commit fc0d037

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+213
-1321
lines changed

docs/accessibilityinfo.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ static isAccessibilityServiceEnabled(): Promise<boolean>;
158158

159159
Check whether any accessibility service is enabled. This includes TalkBack but also any third-party accessibility app that may be installed. To only check whether TalkBack is enabled, use [isScreenReaderEnabled](#isscreenreaderenabled). Returns a promise which resolves to a boolean. The result is `true` when some accessibility services is enabled and `false` otherwise.
160160

161-
> **Note**: Please use [isScreenReaderEnabled](#isscreenreaderenabled) if you only want to check the status of TalkBack.
161+
:::note
162+
Please use [`isScreenReaderEnabled`](#isscreenreaderenabled) if you only want to check the status of TalkBack.
163+
:::
162164

163165
---
164166

@@ -242,4 +244,6 @@ Set accessibility focus to a React component.
242244

243245
On Android, this calls `UIManager.sendAccessibilityEvent` method with passed `reactTag` and `UIManager.AccessibilityEventTypes.typeViewFocused` arguments.
244246

245-
> **Note**: Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`.
247+
:::note
248+
Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`.
249+
:::

docs/actionsheetios.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ Display the iOS share sheet. The `options` object should contain one or both of
132132
- `subject` (string) - a subject for the message
133133
- `excludedActivityTypes` (array) - the activities to exclude from the ActionSheet
134134

135-
> **Note:** If `url` points to a local file, or is a base64-encoded uri, the file it points to will be loaded and shared directly. In this way, you can share images, videos, PDF files, etc. If `url` points to a remote file or address it must conform to URL format as described in [RFC 2396](https://www.ietf.org/rfc/rfc2396.txt). For example, a web URL without a proper protocol (HTTP/HTTPS) will not be shared.
135+
:::note
136+
If `url` points to a local file, or is a base64-encoded uri, the file it points to will be loaded and shared directly. In this way, you can share images, videos, PDF files, etc. If `url` points to a remote file or address it must conform to URL format as described in [RFC 2396](https://www.ietf.org/rfc/rfc2396.txt). For example, a web URL without a proper protocol (HTTP/HTTPS) will not be shared.
137+
:::
136138

137139
The 'failureCallback' function takes one parameter, an error object. The only property defined on this object is an optional `stack` property of type `string`.
138140

docs/alertios.md

Lines changed: 4 additions & 186 deletions
Original file line numberDiff line numberDiff line change
@@ -1,190 +1,8 @@
11
---
22
id: alertios
3-
title: '🚧 AlertIOS'
3+
title: ' AlertIOS'
44
---
55

6-
> **Removed.** Use [`Alert`](alert) instead.
7-
8-
`AlertIOS` provides functionality to create an iOS alert dialog with a message or create a prompt for user input.
9-
10-
Creating an iOS alert:
11-
12-
```jsx
13-
AlertIOS.alert(
14-
'Sync Complete',
15-
'All your data are belong to us.',
16-
);
17-
```
18-
19-
Creating an iOS prompt:
20-
21-
```jsx
22-
AlertIOS.prompt('Enter a value', null, text =>
23-
console.log('You entered ' + text),
24-
);
25-
```
26-
27-
We recommend using the [`Alert.alert`](alert) method for cross-platform support if you don't need to create iOS-only prompts.
28-
29-
---
30-
31-
# Reference
32-
33-
## Methods
34-
35-
### `alert()`
36-
37-
```jsx
38-
static alert(title: string, [message]: string, [callbackOrButtons]: ?(() => void), ButtonsArray, [type]: AlertType): [object Object]
39-
```
40-
41-
Create and display a popup alert.
42-
43-
**Parameters:**
44-
45-
| Name | Type | Required | Description |
46-
| ----------------- | --------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
47-
| title | string | Yes | The dialog's title. Passing null or '' will hide the title. |
48-
| message | string | No | An optional message that appears below the dialog's title. |
49-
| callbackOrButtons | ?(() => void),[ButtonsArray](alertios#buttonsarray) | No | This optional argument should be either a single-argument function or an array of buttons. If passed a function, it will be called when the user taps 'OK'. If passed an array of button configurations, each button should include a `text` key, as well as optional `onPress` and `style` keys. `style` should be one of 'default', 'cancel' or 'destructive'. |
50-
| type | [AlertType](alertios#alerttype) | No | Deprecated, do not use. |
51-
52-
Example with custom buttons:
53-
54-
```jsx
55-
AlertIOS.alert(
56-
'Update available',
57-
'Keep your app up to date to enjoy the latest features',
58-
[
59-
{
60-
text: 'Cancel',
61-
onPress: () => console.log('Cancel Pressed'),
62-
style: 'cancel',
63-
},
64-
{
65-
text: 'Install',
66-
onPress: () => console.log('Install Pressed'),
67-
},
68-
],
69-
);
70-
```
71-
72-
---
73-
74-
### `prompt()`
75-
76-
```jsx
77-
static prompt(title: string, [message]: string, [callbackOrButtons]: ?((text: string) => void), ButtonsArray, [type]: AlertType, [defaultValue]: string, [keyboardType]: string): [object Object]
78-
```
79-
80-
Create and display a prompt to enter some text.
81-
82-
**Parameters:**
83-
84-
| Name | Type | Required | Description |
85-
| ----------------- | --------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
86-
| title | string | Yes | The dialog's title. |
87-
| message | string | No | An optional message that appears above the text input. |
88-
| callbackOrButtons | ?((text: string) => void),[ButtonsArray](alertios#buttonsarray) | No | This optional argument should be either a single-argument function or an array of buttons. If passed a function, it will be called with the prompt's value when the user taps 'OK'. If passed an array of button configurations, each button should include a `text` key, as well as optional `onPress` and `style` keys (see example). `style` should be one of 'default', 'cancel' or 'destructive'. |
89-
| type | [AlertType](alertios#alerttype) | No | This configures the text input. One of 'plain-text', 'secure-text' or 'login-password'. |
90-
| defaultValue | string | No | The default text in text input. |
91-
| keyboardType | string | No | The keyboard type of first text field(if exists). One of 'default', 'email-address', 'numeric', 'phone-pad', 'ascii-capable', 'numbers-and-punctuation', 'url', 'number-pad', 'name-phone-pad', 'decimal-pad', 'twitter' or 'web-search'. |
92-
93-
Example with custom buttons:
94-
95-
```jsx
96-
AlertIOS.prompt(
97-
'Enter password',
98-
'Enter your password to claim your $1.5B in lottery winnings',
99-
[
100-
{
101-
text: 'Cancel',
102-
onPress: () => console.log('Cancel Pressed'),
103-
style: 'cancel',
104-
},
105-
{
106-
text: 'OK',
107-
onPress: password =>
108-
console.log('OK Pressed, password: ' + password),
109-
},
110-
],
111-
'secure-text',
112-
);
113-
```
114-
115-
,
116-
117-
Example with the default button and a custom callback:
118-
119-
```jsx
120-
AlertIOS.prompt(
121-
'Update username',
122-
null,
123-
text => console.log('Your username is ' + text),
124-
null,
125-
'default',
126-
);
127-
```
128-
129-
## Type Definitions
130-
131-
### AlertType
132-
133-
An Alert button type
134-
135-
| Type |
136-
| ----- |
137-
| $Enum |
138-
139-
**Constants:**
140-
141-
| Value | Description |
142-
| -------------- | ---------------------------- |
143-
| default | Default alert with no inputs |
144-
| plain-text | Plain text input alert |
145-
| secure-text | Secure text input alert |
146-
| login-password | Login and password alert |
147-
148-
---
149-
150-
### AlertButtonStyle
151-
152-
An Alert button style
153-
154-
| Type |
155-
| ----- |
156-
| $Enum |
157-
158-
**Constants:**
159-
160-
| Value | Description |
161-
| ----------- | ------------------------ |
162-
| default | Default button style |
163-
| cancel | Cancel button style |
164-
| destructive | Destructive button style |
165-
166-
---
167-
168-
### ButtonsArray
169-
170-
Array or buttons
171-
172-
| Type |
173-
| ----- |
174-
| Array |
175-
176-
**Properties:**
177-
178-
| Name | Type | Description |
179-
| --------- | --------------------------------------------- | ------------------------------------- |
180-
| [text] | string | Button label |
181-
| [onPress] | function | Callback function when button pressed |
182-
| [style] | [AlertButtonStyle](alertios#alertbuttonstyle) | Button style |
183-
184-
**Constants:**
185-
186-
| Value | Description |
187-
| ------- | ------------------------------------- |
188-
| text | Button label |
189-
| onPress | Callback function when button pressed |
190-
| style | Button style |
6+
:::danger Removed from React Native
7+
Use [`Alert`](alert) instead.
8+
:::

docs/animated.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ The `Animated` library is designed to make animations fluid, powerful, and painl
77

88
The core workflow for creating an animation is to create an `Animated.Value`, hook it up to one or more style attributes of an animated component, and then drive updates via animations using `Animated.timing()`.
99

10-
> Don't modify the animated value directly. You can use the [`useRef` Hook](https://react.dev/reference/react/useRef) to return a mutable ref object. This ref object's `current` property is initialized as the given argument and persists throughout the component lifecycle.
10+
:::note
11+
Don't modify the animated value directly. You can use the [`useRef` Hook](https://react.dev/reference/react/useRef) to return a mutable ref object. This ref object's `current` property is initialized as the given argument and persists throughout the component lifecycle.
12+
:::
1113

1214
## Example
1315

docs/appearance.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,27 @@ The `Appearance` module exposes information about the user's appearance preferen
1717

1818
<TabItem value="web">
1919

20-
> The `Appearance` API is inspired by the [Media Queries draft](https://drafts.csswg.org/mediaqueries-5/) from the W3C. The color scheme preference is modeled after the [`prefers-color-scheme` CSS media feature](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme).
20+
:::info
21+
The `Appearance` API is inspired by the [Media Queries draft](https://drafts.csswg.org/mediaqueries-5/) from the W3C. The color scheme preference is modeled after the [`prefers-color-scheme` CSS media feature](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme).
22+
:::
2123

2224
</TabItem>
2325
<TabItem value="android">
2426

25-
> The color scheme preference will map to the user's Light or [Dark theme](https://developer.android.com/guide/topics/ui/look-and-feel/darktheme) preference on Android 10 (API level 29) devices and higher.
27+
:::info
28+
The color scheme preference will map to the user's Light or [Dark theme](https://developer.android.com/guide/topics/ui/look-and-feel/darktheme) preference on Android 10 (API level 29) devices and higher.
29+
:::
2630

2731
</TabItem>
2832
<TabItem value="ios">
2933

30-
> The color scheme preference will map to the user's Light or [Dark Mode](https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/dark-mode/) preference on iOS 13 devices and higher.
34+
:::info
35+
The color scheme preference will map to the user's Light or [Dark Mode](https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/dark-mode/) preference on iOS 13 devices and higher.
36+
:::
3137

32-
> Note: When taking a screenshot, by default, the color scheme may flicker between light and dark mode. It happens because the iOS takes snapshots on both color schemes and updating the user interface with color scheme is asynchronous.
38+
:::note
39+
When taking a screenshot, by default, the color scheme may flicker between light and dark mode. It happens because the iOS takes snapshots on both color schemes and updating the user interface with color scheme is asynchronous.
40+
:::
3341

3442
</TabItem>
3543
</Tabs>
@@ -63,13 +71,15 @@ Indicates the current user preferred color scheme. The value may be updated late
6371

6472
Supported color schemes:
6573

66-
- `light`: The user prefers a light color theme.
67-
- `dark`: The user prefers a dark color theme.
68-
- null: The user has not indicated a preferred color theme.
74+
- `'light'`: The user prefers a light color theme.
75+
- `'dark'`: The user prefers a dark color theme.
76+
- `null`: The user has not indicated a preferred color theme.
6977

7078
See also: `useColorScheme` hook.
7179

72-
> Note: `getColorScheme()` will always return `light` when debugging with Chrome.
80+
::note
81+
`getColorScheme()` will always return `light` when debugging with Chrome.
82+
:::
7383

7484
---
7585

@@ -87,7 +97,9 @@ Supported color schemes:
8797
- `dark`: Apply dark user interface style.
8898
- null: Follow the system's interface style.
8999

90-
> Note: The change will not affect the system's selected interface style or any style set in other applications.
100+
:::note
101+
The change will not affect the system's selected interface style or any style set in other applications.
102+
:::
91103

92104
---
93105

docs/appregistry.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,9 @@ Application configuration for the `registerConfig` method.
312312
| run | function |
313313
| section | boolean |
314314

315-
> **Note:** Every config is expected to set either `component` or `run` function.
315+
:::note
316+
Every config is expected to set either `component` or `run` function.
317+
:::
316318

317319
### Registry
318320

0 commit comments

Comments
 (0)