Skip to content

Commit df4632d

Browse files
committed
Update info callout titles
1 parent 8b8acd8 commit df4632d

Some content is hidden

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

55 files changed

+85
-88
lines changed

WRITING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ We ask that you use them sparingly.
6666
3. Once you have the Aside component imported, simply follow the below example for how to add one to your document.
6767

6868
```
69-
:::info
69+
:::note
7070
content here
7171
:::
7272
```

src/routes/concepts/components/basics.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function App() {
2727
}
2828
```
2929

30-
:::info[Note]
30+
:::note
3131

3232
Component names must start with a capital letter to distinguish them from regular HTML elements.
3333
Otherwise, they won't be recognized as components.
@@ -155,7 +155,7 @@ This example uses a [ternary operator](https://developer.mozilla.org/en-US/docs/
155155
When `count` is greater than 5, the component will display `"Count limit reached"`.
156156
Otherwise, it will display the current count with an increment button.
157157

158-
:::info
158+
:::note
159159
To simplify conditional rendering, Solid provides built-in [control-flow](/concepts/control-flow/conditional-rendering) components like [`Show`](/concepts/control-flow/conditional-rendering#show), which create a more readable conditional rendering experience.
160160

161161
```tsx

src/routes/concepts/components/class-style.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const [current, setCurrent] = createSignal("foo");
9696
This is because `classList` selectively toggles only the classes that require alteration, while `class` will be re-evaluated each time.
9797
For a single conditional class, using `class` might be simpler but as the number of conditional classes increases, `classList` offers a more readable and declarative approach.
9898

99-
:::info
99+
:::note
100100
While it is possible, mixing `class` and `classList` can introduce unexpected errors.
101101
If both are reactive when the `class` value changes, Solid will set the entire `class` attribute.
102102
This will remove any classes set by `classList`.

src/routes/concepts/components/event-handlers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ button
182182
</div>
183183
```
184184

185-
:::info[onInput / onChange]
185+
:::note[onInput / onChange]
186186

187187
`onChange` and `onInput` events work according to their native behavior:
188188
- `onInput` will fire immediately after the value has changed

src/routes/concepts/context.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ function Child() {
247247
248248
If no default value is passed to `createContext`, it is possible for `useContext` to return `undefined`.
249249
250-
:::info[More on default values]
250+
:::note[More on default values]
251251
Read more about default values in the [`createContext`](/reference/component-apis/create-context) entry.
252252
:::
253253

src/routes/concepts/control-flow/portal.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ By putting the element outside of the parent element, it is no longer bound by t
3838
This creates a more accessible experience for users, as the content is no longer obscured.
3939

4040

41-
:::info
41+
:::note
4242
`<Portal>` will render wrapped unless specifically targeting `document.head`.
4343

4444
This is so events propagate through the Portal according to the component hierarchy instead of the elements hierarchy.

src/routes/concepts/effects.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ setCount(1); // Output: 1, "Hello"
8787
setMessage("World"); // Output: 1, "World"
8888
```
8989

90-
:::info
90+
:::note
9191
When a signal updates, it notifies all of its subscribers sequentially but the *order can vary*.
9292
While effects are guaranteed to run when a signal updates, the execution might **not** be instantaneous.
9393
This means that the order of execution of effects is *not guaranteed* and should not be relied upon.

src/routes/concepts/refs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function Component() {
2929
This lets you create and access DOM elements similar to [`document.createElement`](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement) but without having to wait until it is attached to the DOM.
3030
It can be used multiple times without having to worry about duplicate selectors.
3131

32-
The downside of this approach is that it separates the element and any child elements from the rest of the JSX structure.
32+
The downside of this approach is that it separates the element and any child elements from the rest of the JSX structure.
3333
This makes the component's JSX structure more difficult to read and understand.
3434

3535
## Refs in Solid
@@ -61,7 +61,7 @@ If access to an element is needed before it is added to the DOM, you can use the
6161
</p>
6262
```
6363

64-
:::info
64+
:::note
6565
In TypeScript, you must use a definitive assignment assertion.
6666
Since Solid takes care of assigning the variable when the component is rendered, this signals to TypeScript that the variable will be assigned, even if it can't
6767
confirm it.

src/routes/concepts/signals.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const [count, setCount] = createSignal(0);
2121
// ^ getter ^ setter
2222
```
2323

24-
:::info
24+
:::note
2525
The syntax using `[` and `]` is called [array destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment).
2626

2727
This lets you extract values from the array.
@@ -79,7 +79,7 @@ function Counter() {
7979
}
8080
```
8181

82-
:::info
82+
:::note
8383
A tracking scope can be created by [`createEffect`](/reference/basic-reactivity/create-effect) or [`createMemo`](/reference/basic-reactivity/create-memo), which are other Solid primitives.
8484

8585
Both functions subscribe to the signals accessed within them, establishing a dependency relationship.

src/routes/concepts/stores.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ const App = () => {
193193
}
194194
```
195195

196-
:::info
196+
:::note
197197
Separating the read and write capabilities of a store provides a valuable debugging advantage.
198198

199199
This separation facilitates the tracking and control of the components that are accessing or changing the values.
@@ -358,8 +358,8 @@ setStore("users", (user) => user.username.startsWith("t"), "loggedIn", false)
358358
// update users with location "Canada"
359359
setStore("users", (user) => user.location == "Canada" , "loggedIn", false)
360360

361-
// update users with id 1, 2 or 3
362-
let ids = [1,2,3]
361+
// update users with id 1, 2 or 3
362+
let ids = [1,2,3]
363363
setStore("users", (user) => ids.includes(user.id) , "loggedIn", false)
364364
```
365365

src/routes/concepts/understanding-jsx.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ In JSX files, HTML attributes are used much like regular HTML, with a few key di
8787
</button>
8888
```
8989
90-
:::info
90+
:::note
9191
If you wish to pass objects in JSX, such as with inline styling, you will have to use double curly braces (`{{ }}`).
9292
9393
```jsx
@@ -119,7 +119,7 @@ They connect the component with the data it requires, for seamless data flows an
119119
Props are also used to fill components with data that comes from resources, like [`createResource`](/reference/basic-reactivity/create-resource) calls.
120120
This results in components that react in real-time to data changes.
121121

122-
:::info
122+
:::note
123123
Expressions, whether fixed or dynamic, get applied *in the order defined within the JSX*.
124124
This works for a wide range of DOM elements, but will not work with elements that require attributes to be defined in a special order, such as input types with `type='range'`.
125125

src/routes/configuration/environment-variables.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface ImportMeta {
2424
}
2525
```
2626

27-
:::info
27+
:::note
2828
To prevent accidental exposure of environment variables to the client, only variables prefixed with `VITE_` will be exposed.
2929

3030
For example:

src/routes/configuration/typescript.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function MyJsComponent() {
114114
}
115115
```
116116

117-
:::info
117+
:::note
118118
If you wish to change the entry point file from `index.jsx` to `index.tsx`, you need to modify the `src` attribute in `<script>` to look like the following:
119119

120120
```html
@@ -377,7 +377,7 @@ function MyGenericComponent<T>(props: MyProps<T>): JSX.Element {
377377
}
378378
```
379379

380-
:::info
380+
:::note
381381
Each `Component` type has a corresponding `Props` type that defines the shape
382382
of its properties. These `Props` types also accept the same generic types as
383383
their associated `Component` types.
@@ -479,7 +479,7 @@ return <div ref={divRef!}>...</div>
479479

480480
In this case, using `divRef!` within the `ref` attribute signals to TypeScript that `divRef` will receive an assignment after this stage, which is more in line with how Solid works.
481481

482-
:::info
482+
:::note
483483
While TypeScript does catch incorrect usage of refs that occur before their
484484
JSX block definition, it currently does not identify undefined variables
485485
within certain nested functions in Solid. Therefore, additional care is needed
@@ -644,7 +644,7 @@ declare module "solid-js" {
644644
<div on:Name={(event) => console.log("name is", event.detail.name)} />;
645645
```
646646

647-
:::info
647+
:::note
648648
<span>New in v1.9.0</span>
649649
:::
650650

@@ -664,7 +664,7 @@ const handler: JSX.EventHandlerWithOptions<HTMLDivElement, Event> = {
664664
<div on:click={handler} />;
665665
```
666666

667-
:::info
667+
:::note
668668
**Note**:
669669
By default, using native events like `mousemove` with the `on` prefix — for example, `<div on:mousemove={e => {}} />` — will trigger a TypeScript error.
670670
This occurs because these native events are not part of Solid's custom event type definitions.

src/routes/guides/complex-state-management.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ const addTask = (text) => {
216216

217217
Read about some of the other [advantages to using `produce`](/concepts/stores#store-updates-with-produce).
218218

219-
:::info
219+
:::note
220220
Another benefit to working with `produce` is that it offers a way to modify a store without having to make multiple `setStore` calls.
221221

222222
```jsx

src/routes/guides/routing-and-navigation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ Please note that while it is best practice to name these files as `[id].data.js`
467467
The value of a preload function is passed to the page component when called at any time other than "preload".
468468
This means you can initialize the page, or use [Data APIs](/solid-router/reference/data-apis/create-async).
469469

470-
:::info
470+
:::note
471471
To prevent a fetch from happening more than once, or to trigger a refetch, you
472472
can use the [`query` function](/solid-router/reference/data-apis/query).
473473
:::

src/routes/guides/state-management.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ When sharing state between components, you can access the state through [`props`
335335
Props values that are passed down from the parent component are read-only, which means they cannot be directly modified by the child component.
336336
However, you can pass down setter functions from the parent component to allow the child component to indirectly modify the parent's state.
337337

338-
:::info
338+
:::note
339339
To encourage one-way data flow, props are passed as read-only or immutable values from the parent to child components.
340340

341341
There are [specific utility functions for props](/concepts/components/props), however, that offer methods to modify props values.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ order: 5
44
mainNavExclude: true
55
---
66

7-
:::info[Note]
7+
:::note
88
This guide is for Tailwind CSS v4. For **Tailwind CSS v3** refer to [Tailwind CSS v3](/guides/styling-components/tailwind-v3).
99
:::
1010

src/routes/guides/testing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ const createWrapper = (value) => (props) =>
261261
<DataContext value={value} {...props}/>
262262
```
263263
264-
:::info[Using multiple providers]
264+
:::note[Using multiple providers]
265265
If using multiple providers, [solid-primitives has `<MultiProvider>`](https://primitives.solidjs.community/package/context#multiprovider) to avoid nesting multiple levels of providers
266266
:::
267267

src/routes/pt-br/quick-start.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Additionally, we offer a [JavaScript](https://stackblitz.com/github/solidjs/temp
1010

1111
## Creating a Solid application
1212

13-
:::info[Prerequisites]
13+
:::note[Prerequisites]
1414

1515
- Familiarity with the command line
1616
- Install [Node.js](https://nodejs.org/en)

src/routes/pt-br/solid-router/quick-start.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Additionally, we offer a [JavaScript](https://stackblitz.com/github/solidjs/temp
1010

1111
## Creating a Solid application
1212

13-
:::info[Prerequisites]
13+
:::note[Prerequisites]
1414

1515
- Familiarity with the command line
1616
- Install [Node.js](https://nodejs.org/en)

src/routes/quick-start.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Start with the [TypeScript](https://stackblitz.com/github/solidjs/templates/tree
1010

1111
## Create a Solid project
1212

13-
:::info[Prerequisites]
13+
:::note[Prerequisites]
1414

1515
- Familiarity with the command line.
1616
- A recent version of [Node.js](https://nodejs.org/en), [Bun](https://bun.sh/), or [Deno](https://deno.com/).

src/routes/reference/basic-reactivity/create-signal.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: createSignal
33
---
44

5-
Signals are the most basic reactive primitive.
5+
Signals are the most basic reactive primitive.
66
They track a single value (which can be a value of any type) that changes over time.
77

88
```tsx
@@ -38,8 +38,8 @@ Calling the getter (e.g., `count()` or `ready()`) returns the current value of t
3838

3939
Crucial to automatic dependency tracking, calling the getter within a tracking scope causes the calling function to depend on this Signal, so that function will rerun if the Signal gets updated.
4040

41-
Calling the setter (e.g., `setCount(nextCount)` or `setReady(nextReady)`) sets the Signal's value and updates the Signal (triggering dependents to rerun) if the value actually changed (see details below).
42-
The setter takes either the new value for the signal or a function that maps the previous value of the signal to a new value as its only argument.
41+
Calling the setter (e.g., `setCount(nextCount)` or `setReady(nextReady)`) sets the Signal's value and updates the Signal (triggering dependents to rerun) if the value actually changed (see details below).
42+
The setter takes either the new value for the signal or a function that maps the previous value of the signal to a new value as its only argument.
4343
The updated value is also returned by the setter. As an example:
4444

4545
```tsx
@@ -63,7 +63,7 @@ const newCount = setCount((prev) => prev + 1)
6363

6464
```
6565

66-
:::info
66+
:::note
6767
If you want to store a function in a Signal you must use the function form:
6868

6969
```tsx

src/routes/reference/components/no-hydration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ During server-side rendering, components and elements wrapped within `<NoHydrati
77
However, during client-side hydration, Solid bypasses the hydration process for the content within `<NoHydration>`.
88
This means that elements within `<NoHydration>` will not have event listeners attached by Solid, and their state will not be managed reactively on the client-side after the initial render.
99

10-
:::info[Note]
10+
:::note
1111
Placing a `<Hydration>` component inside `<NoHydration>` has no effect and will not override the `<NoHydration>` behavior.
1212
:::
1313

src/routes/reference/components/suspense.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const MyComponentWithSuspenseAndShow = () => {
134134
135135
In this code, we don't create _any_ DOM nodes inside {"<Suspense>"} before the resource resolves, so it is pretty much the same as the second example where we only used `<Show>`.
136136
137-
:::info
137+
:::note
138138
Suspense is triggered by reading a resource inside the {"<Suspense>"}{" "}
139139
boundary. Components wrapped with suspense still run fully, just as they would
140140
without suspense. However, code wrapped in `onMount` and `createEffect` only

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

Lines changed: 1 addition & 1 deletion
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-
:::info[Strong-Typing Custom Attributes]
12+
:::note[Strong-Typing Custom Attributes]
1313
Type definitions are required when using TypeScript.
1414
See the[TypeScript](/configuration/typescript#forcing-properties-and-custom-attributes) page for examples.
1515
:::

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

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

2121
```
2222

23-
:::info[Strong-Typing Custom Boolean Attributes]
23+
:::note[Strong-Typing Custom Boolean Attributes]
2424
Type definitions are required when using TypeScript.
2525
See the [TypeScript](/configuration/typescript#forcing-properties-and-custom-attributes) page for examples.
2626
:::

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ First, `class` can be set like other attributes. For example:
1818
<div class={`${state.active ? 'active' : ''} ${state.currentId === row.id ? 'editing' : ''}`} />
1919
```
2020

21-
:::info
21+
:::note
2222
Note that <code>className</code> was deprecated in Solid 1.4 in favor of {" "}
2323
<code>class</code>.
2424
:::
@@ -27,7 +27,7 @@ Alternatively, the `classList` pseudo-attribute lets you specify an object, wher
2727

2828
```tsx
2929
<div
30-
classList={{
30+
classList={{
3131
active: state.active,
3232
editing: state.currentId === row.id,
3333
}}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ For events with capital letters, listener options, or if you need to attach even
1111

1212
This directly attaches an event handler (via [`addEventListener`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)) to the `div`.
1313

14-
:::info
14+
:::note
1515
<span>New in v1.9.0</span>
1616
:::
1717

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

Lines changed: 2 additions & 2 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-
:::info[Strong-Typing Custom Properties]
12+
:::note[Strong-Typing Custom Properties]
1313
Type definitions are required when using TypeScript.
1414
See the [TypeScript](/configuration/typescript#forcing-properties-and-custom-attributes) page for examples.
15-
:::
15+
:::

src/routes/reference/reactive-utilities/catch-error.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: catchError
33
---
44

5-
:::info
5+
:::note
66
<span>New in v1.7.0</span>
77
:::
88

src/routes/reference/reactive-utilities/on-util.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ setA("new"); // now it runs
3636

3737
## Using `on` with stores
3838

39-
:::info
39+
:::note
4040
Please note that on stores and mutable, adding or removing a property from the
4141
parent object will trigger an effect. See [`createMutable`](/reference/store-utilities/create-mutable)
4242

0 commit comments

Comments
 (0)