Skip to content

Commit 36099ec

Browse files
Updated admonitions
1 parent 51517d4 commit 36099ec

File tree

3 files changed

+36
-24
lines changed

3 files changed

+36
-24
lines changed

docs/components/overview.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ All components are customizable and can be organized using layout components to
1919

2020
To use components, messages must be sent with the `IS_COMPONENTS_V2` flag (`1<<15`). Note that using this flag disables traditional content and embeds - all content must be sent as components instead.
2121

22-
> info
23-
> [Legacy message component behavior](/docs/components/reference#legacy-message-component-behavior) will **not** be deprecated and will continue to be available to your apps on a message-by-message basis. However, we recommend using the new components for new projects and features.
22+
:::info
23+
[Legacy message component behavior](/docs/components/reference#legacy-message-component-behavior) will **not** be deprecated and will continue to be available to your apps on a message-by-message basis. However, we recommend using the new components for new projects and features.
24+
:::
2425

2526
<Container>
2627
<Card title="Using Message Components" link="/docs/components/using-message-components" icon="ChatDotsIcon">

docs/components/reference.mdx

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ To use these components, you need to send the [message flag](/docs/resources/mes
1616
- Attachments won't show by default - they must be exposed through components
1717
- The `poll` and `stickers` fields are disabled
1818

19-
> info
20-
> [Legacy component behavior](/docs/components/reference#legacy-message-component-behavior) will continue to work but provide less flexibility and control over the message layout.
19+
:::info
20+
[Legacy component behavior](/docs/components/reference#legacy-message-component-behavior) will continue to work but provide less flexibility and control over the message layout.
21+
:::
2122

2223
For a practical guide on implementing these components, see our [Using Message Components](/docs/components/using-message-components) and [Using Modal Components](/docs/components/using-modal-components) documentation.
2324

@@ -485,8 +486,9 @@ String Selects must be placed inside an [Action Row](/docs/components/reference#
485486

486487
The `resolved` object is included in interaction payloads for user, role, mentionable, and channel select menu components. `resolved` contains a nested object with additional details about the selected options with the key of the resource type—`users`, `roles`, `channels`, and `members`.
487488

488-
> info
489-
> `members` and `users` may both be present in the `resolved` object when a user is selected (in either a [user select](/docs/components/reference#user-select) or [mentionable select](/docs/components/reference#mentionable-select)).
489+
:::info
490+
`members` and `users` may both be present in the `resolved` object when a user is selected (in either a [user select](/docs/components/reference#user-select) or [mentionable select](/docs/components/reference#mentionable-select)).
491+
:::
490492

491493
###### Example Resolved Object
492494

@@ -823,8 +825,9 @@ A Section is a top-level layout component that allows you to join text contextua
823825

824826
Sections are only available in messages.
825827

826-
> info
827-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
828+
:::info
829+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
830+
:::
828831

829832
###### Section Structure
830833

@@ -835,8 +838,9 @@ Sections are only available in messages.
835838
| components | array of [text display components](/docs/components/reference#text-display) | One to three text components |
836839
| accessory | [thumbnail component](/docs/components/reference#thumbnail) or [button components](/docs/components/reference#button) | A thumbnail or a button component, with a future possibility of adding more compatible components |
837840

838-
> info
839-
> Don't hardcode `components` to contain only text components. We may add other components in the future. Similarly, `accessory` may be expanded to include other components in the future.
841+
:::info
842+
Don't hardcode `components` to contain only text components. We may add other components in the future. Similarly, `accessory` may be expanded to include other components in the future.
843+
:::
840844

841845
###### Example
842846

@@ -876,8 +880,9 @@ A Text Display is a top-level content component that allows you to add text to y
876880

877881
Text Displays are only available in messages.
878882

879-
> info
880-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
883+
:::info
884+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
885+
:::
881886

882887
###### Text Display Structure
883888

@@ -906,8 +911,9 @@ A Thumbnail is a content component that is a small image only usable as an acces
906911

907912
Thumbnails are only available in messages as an accessory in a [section](/docs/components/reference#section).
908913

909-
> info
910-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2), which can be activated on a per-message basis.
914+
:::info
915+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2), which can be activated on a per-message basis.
916+
:::
911917

912918
###### Thumbnail Structure
913919

@@ -929,8 +935,9 @@ A Media Gallery is a top-level content component that allows you to display 1-10
929935

930936
Media Galleries are only available in messages.
931937

932-
> info
933-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
938+
:::info
939+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
940+
:::
934941

935942
###### Media Gallery Structure
936943

@@ -982,8 +989,9 @@ Media Galleries are only available in messages.
982989

983990
A File is a top-level component that allows you to display an uploaded file as an attachment to the message and reference it in the component. This is similar to the `embeds` field of a message but allows you to control the layout of your message by using this anywhere as a component. Files are only available in messages.
984991

985-
> info
986-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
992+
:::info
993+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
994+
:::
987995

988996
###### File Structure
989997

@@ -1033,8 +1041,9 @@ A Separator is a top-level layout component that adds vertical padding and visua
10331041

10341042
Separators are only available in messages.
10351043

1036-
> info
1037-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
1044+
:::info
1045+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
1046+
:::
10381047

10391048
###### Separator Structure
10401049

@@ -1073,8 +1082,9 @@ A Container is a top-level layout component that holds up to 10 components. Cont
10731082

10741083
Containers are only available in messages.
10751084

1076-
> info
1077-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
1085+
:::info
1086+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
1087+
:::
10781088

10791089
###### Container Structure
10801090

docs/components/using-modal-components.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ sidebar_label: Using Modal Components
88

99
Modal components are a great way to collect freeform information from your users.
1010

11-
> info
12-
> Currently, only [Text Input](/docs/components/reference#text-input) fields are supported in a modal, and each one must be placed in an [Action Row](/docs/components/reference#action-row).
11+
:::info
12+
Currently, only [Text Input](/docs/components/reference#text-input) fields are supported in a modal, and each one must be placed in an [Action Row](/docs/components/reference#action-row).
13+
:::
1314

1415
### Prerequisites
1516

0 commit comments

Comments
 (0)