Skip to content

Commit a27348f

Browse files
committed
Convert admonishments from <Callout /> to standard ::: format
1 parent 51a56bd commit a27348f

Some content is hidden

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

42 files changed

+915
-752
lines changed

docs/language/accounts/contracts.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,17 @@ then the function aborts the program.
264264

265265
When the update succeeded, the function returns the [deployed contract](#deployed-contract).
266266

267-
<Callout type="info">
267+
:::warning
268+
268269
The `update` function does **not** run the initializer of the contract again.
269270

270271
Updating a contract does **not** change the contract instance and its existing stored data.
271272
A contract update only changes the code a contract.
272273

273274
Is only possible to update contracts in ways that keep data consistency.
274275
[Certain restrictions apply](../contract-updatability.md).
275-
</Callout>
276+
277+
:::
276278

277279
For example, assuming that a contract named `Test` is already deployed to the account,
278280
and it should be updated with the following contract code:

docs/language/accounts/inbox.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ the function returns `nil`.
9494
If the borrow type of the capability is not a subtype of the provided type argument,
9595
the program aborts.
9696

97-
<Callout type="info">
97+
:::tip
98+
9899
It is only possible to claim a capability once.
99-
</Callout>
100+
101+
:::
100102

101103
Calling function `claim` function emits an event, `InboxValueClaimed`,
102104
that includes the address of both the provider and the recipient,

docs/language/accounts/keys.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,12 @@ For each key of the account, the `forEach` function calls the given callback, pa
120120
When the callback function returns `true` the iteration continues,
121121
and when it returns `false`, iteration stops.
122122

123-
<Callout type="warning">
124-
The `keys.get` and `keys.forEach` functions include revoked keys,
125-
which have the `isRevoked` field set to `true`.
126-
</Callout>
123+
:::warning
124+
125+
The `keys.get` and `keys.forEach` functions include revoked keys,
126+
which have the `isRevoked` field set to `true`.
127+
128+
:::
127129

128130
```cadence
129131
access(all)

docs/language/accounts/storage.mdx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -419,14 +419,17 @@ If the callback function returns `false`, the iteration function stops.
419419
The specific order in which the objects are iterated over is undefined,
420420
as is the behavior when a path is added or removed from storage.
421421

422-
<Callout type="info">
423-
The iteration functions skip broken objects.
422+
:::warning
424423

425-
An object could be broken due to invalid types associated with the stored value.
426-
For example, the contract for the stored object might have syntactic or semantic errors.
427-
</Callout>
424+
The iteration functions skip broken objects.
425+
426+
An object could be broken due to invalid types associated with the stored value.
427+
For example, the contract for the stored object might have syntactic or semantic errors.
428+
429+
:::
430+
431+
:::warning
428432

429-
<Callout type="warning">
430433
The order of iteration is undefined. Do not rely on any particular behavior.
431434

432435
Saving an object to a path or loading an object from storage during iteration
@@ -458,7 +461,7 @@ account.storage.forEachStored(fun (path: StoragePath, type: Type): Bool {
458461
})
459462
```
460463

461-
</Callout>
464+
:::
462465

463466
## Storage limit
464467

docs/language/built-in-functions.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ and [FLIP120](https://github.com/onflow/flips/pull/120) for more details.
6161

6262
Nevertheless, developers need to be mindful to use `revertibleRandom()` correctly:
6363

64-
<Callout type="warning">
64+
:::warning
6565

6666
A transaction can atomically revert all its action.
6767
It is possible for a transaction submitted by an untrusted party
6868
to post-select favorable results and revert the transaction for unfavorable results.
6969

70-
</Callout>
70+
:::
7171

7272
The function usage remains safe when called by a trusted party that does not
7373
perform post-selection on the returned random numbers.

docs/language/glossary.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ sidebar_position: 32
44
---
55

66

7-
<Callout type="info">
7+
:::tip
8+
89
Tip: <kbd>CTRL</kbd>/<kbd>⌘</kbd> + <kbd>F</kbd> and type in the symbol or operator you want to look up.
9-
</Callout>
10+
11+
:::
1012

1113
## `&` (ampersand)
1214

docs/language/interfaces.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,11 +458,11 @@ shape.area // is `54`
458458

459459
## Interface Nesting
460460

461-
<Callout type="info">
461+
:::warning[🚧 Status]
462462

463-
🚧 Status: Currently only contracts and contract interfaces support nested interfaces.
463+
Currently only contracts and contract interfaces support nested interfaces.
464464

465-
</Callout>
465+
:::
466466

467467
Interfaces can be arbitrarily nested.
468468
Declaring an interface inside another does not require implementing types

docs/language/references.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,11 @@ let r2 <- r
414414
ref.id = 2
415415
```
416416

417-
<Callout type="info">
417+
:::tip
418+
418419
Invalidations of storage references are not statically caught, but only at run-time.
419-
</Callout>
420+
421+
:::
420422

421423
## Dereferencing values
422424

docs/language/resources.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,13 @@ id2 != id3 // true
604604
id3 != id1 // true
605605
```
606606

607-
<Callout type="warning">
607+
:::warning
608+
608609
The details of how the identifiers are generated is an implementation detail.
609610

610611
Do not rely on or assume any particular behaviour in Cadence programs.
611-
</Callout>
612+
613+
:::
612614

613615
## Resource Owner
614616

docs/language/values-and-types.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,12 @@ All integer types support the following functions:
246246

247247
## Fixed-Point Numbers
248248

249-
<Callout type="info">
249+
:::warning[🚧 Status]
250250

251-
🚧 Status: Currently only the 64-bit wide `Fix64` and `UFix64` types are available.
251+
Currently only the 64-bit wide `Fix64` and `UFix64` types are available.
252252
More fixed-point number types will be added in a future release.
253253

254-
</Callout>
254+
:::
255255

256256
Fixed-point numbers are useful for representing fractional values.
257257
They have a fixed number of digits after decimal point.

0 commit comments

Comments
 (0)