Skip to content

Commit 82a8758

Browse files
authored
Update info callout titles (#1207)
1 parent 8b8acd8 commit 82a8758

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

+89
-86
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

0 commit comments

Comments
 (0)