Skip to content

Commit 1376133

Browse files
authored
Switch to SolidBase callout syntax (#1131)
1 parent 4a1ee6b commit 1376133

File tree

17 files changed

+51
-69
lines changed

17 files changed

+51
-69
lines changed

src/routes/concepts/context.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ const Provider = (props) => (
6060
);
6161
```
6262

63-
<Callout type="tip" title="Complex Types">
63+
:::tip[Complex Types]
6464
When passing multiple values (as an `array` or `object`), it is recommended to use a [store](/reference/component-apis/create-context#usage).
65-
</Callout>
65+
:::
6666

6767
## Consuming context
6868

@@ -257,9 +257,9 @@ function Child() {
257257
258258
If no default value is passed to `createContext`, it is possible for `useContext` to return `undefined`.
259259
260-
<Callout type="info" title="More on default values">
260+
:::info[More on default values]
261261
Read more about default values in the [`createContext`](/reference/component-apis/create-context) entry.
262-
</Callout>
262+
:::
263263
264264
Because of this, if an initial value was not passed to `createContext`, the TS type signature of `useContext` will indicate that
265265
the value returned might be `undefined` (as mentioned above).

src/routes/guides/styling-components/tailwind.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ order: 5
44
mainNavExclude: true
55
---
66

7-
<Callout type="info" title="Note">
8-
7+
:::info[Note]
98
This guide is for Tailwind CSS v4. For **Tailwind CSS v3** refer to [Tailwind CSS v3](/guides/styling-components/tailwind-v3).
10-
11-
</Callout>
9+
:::
1210

1311
[Tailwind CSS](https://tailwindcss.com/) is an on-demand utility CSS library that integrates seamlessly with Solid as a built-in PostCSS plugin.
1412

src/routes/reference/component-apis/create-context.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ The default value is used when no Provider is found above in the hierarchy.
1313

1414
To avoid reinstatiating a new context when Hot-Module Replacement (HMR) occurs, it is recommended to use `createContext` in its own module (file).
1515

16-
<Callout type="danger" title="Hot-Module Replacement">
17-
When using HMR, the context is lost when the module is reloaded. Which will cause an error to be thrown as `useContext` will try to access it while it is still reloading.
18-
</Callout>
16+
:::danger[Hot-Module Replacement]
17+
When using HMR, the context is lost when the module is reloaded.
18+
Which will cause an error to be thrown as `useContext` will try to access it while it is still reloading.
19+
:::
1920

2021

2122
For example:

src/routes/reference/jsx-attributes/attr.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Useful for Web Components where you want to set attributes.
99
<my-element attr:status={props.status} />
1010
```
1111

12-
<Callout type="info" title="Strong-Typing Custom Attributes">
13-
Type definitions are required when using TypeScript.
14-
See the[TypeScript](/configuration/typescript#forcing-properties-and-custom-attributes) page for examples.
15-
</Callout>
12+
:::info[Strong-Typing Custom Attributes]
13+
Type definitions are required when using TypeScript.
14+
See the[TypeScript](/configuration/typescript#forcing-properties-and-custom-attributes) page for examples.
15+
:::

src/routes/reference/jsx-attributes/bool.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This attribute is most useful for Web Components.
2020

2121
```
2222

23-
<Callout type="info" title="Strong-Typing Custom Boolean Attributes">
24-
Type definitions are required when using TypeScript.
25-
See the [TypeScript](/configuration/typescript#forcing-properties-and-custom-attributes) page for examples.
26-
</Callout>
23+
:::info[Strong-Typing Custom Boolean Attributes]
24+
Type definitions are required when using TypeScript.
25+
See the [TypeScript](/configuration/typescript#forcing-properties-and-custom-attributes) page for examples.
26+
:::

src/routes/reference/jsx-attributes/prop.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Forces the prop to be treated as a property instead of an attribute.
99
<div prop:scrollTop={props.scrollPos + "px"} />
1010
```
1111

12-
<Callout type="info" title="Strong-Typing Custom Properties">
13-
Type definitions are required when using TypeScript.
14-
See the [TypeScript](/configuration/typescript#forcing-properties-and-custom-attributes) page for examples.
15-
</Callout>
12+
:::info[Strong-Typing Custom Properties]
13+
Type definitions are required when using TypeScript.
14+
See the [TypeScript](/configuration/typescript#forcing-properties-and-custom-attributes) page for examples.
15+
:::

src/routes/reference/jsx-attributes/use.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ declare module "solid-js" {
3535
}
3636
```
3737

38-
<Callout type="caution" title="Limitations">
38+
:::caution[Limitations]
3939
Directives only work with native HTML elements (HTML/SVG/MathML/Custom Elements).
4040
Directives are not forwarded and **won't work in user defined components**, such as `<MyComponent use:myinput={[..]}/>` [see also](https://github.com/solidjs/solid/discussions/722)
41-
</Callout>
41+
:::

src/routes/solid-router/concepts/actions.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ In this example, the `echo` action simulates a fetch call with a 1 second delay
4343
The `echo` action will act as a backend, however, it can be substituted for any API provided it can be run on the client.
4444
Typically, route actions are used with some sort of solution like fetch or GraphQL.
4545

46-
<Callout type="tip">
47-
46+
:::tip
4847
In [SolidStart](/solid-start) apps, it's recommended to use the [`"use server"`](/solid-start/reference/server/use-server) directive to leverage server-side caching.
49-
50-
</Callout>
48+
:::
5149

5250
### Using actions
5351

src/routes/solid-router/reference/data-apis/action.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ const deleteTodo = action(async (id: number) => {
5959

6060
```
6161

62-
<Callout type="tip">
63-
62+
:::tip
6463
In [SolidStart](/solid-start) apps, it's recommended to use the [`"use server"`](/solid-start/reference/server/use-server) directive to leverage server-side caching.
65-
66-
</Callout>
64+
:::
6765

6866
## Notes of `<form>` implementation and SSR
6967

src/routes/solid-router/reference/data-apis/use-action.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ const updateName = useAction(updateNameAction);
1313
const result = updateName("John Wick");
1414
```
1515

16-
<Callout type="info" title="Note">
17-
`useAction` requires client-side JavaScript and is not progressively
18-
enhanceable.
19-
</Callout>
16+
:::info[Note]
17+
`useAction` requires client-side JavaScript and is not progressively enhanceable.
18+
:::
2019

2120
## Parameters
2221

0 commit comments

Comments
 (0)