Skip to content

Commit fe16a7d

Browse files
committed
Translate addTransitionType
1 parent 356741e commit fe16a7d

1 file changed

Lines changed: 28 additions & 28 deletions

File tree

‎src/content/reference/react/addTransitionType.md‎

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: addTransitionType
44

55
<Intro>
66

7-
`addTransitionType` lets you specify the cause of a transition.
7+
`addTransitionType` を使うと、トランジションの原因を指定できます。
88

99

1010
```js
@@ -20,30 +20,30 @@ startTransition(() => {
2020

2121
---
2222

23-
## Reference {/*reference*/}
23+
## リファレンス {/*reference*/}
2424

2525
### `addTransitionType` {/*addtransitiontype*/}
2626

27-
#### Parameters {/*parameters*/}
27+
#### 引数 {/*parameters*/}
2828

29-
- `type`: The type of transition to add. This can be any string.
29+
- `type`: 追加するトランジションタイプ。任意の文字列を指定できます。
3030

31-
#### Returns {/*returns*/}
31+
#### 返り値 {/*returns*/}
3232

33-
`addTransitionType` does not return anything.
33+
`addTransitionType` は何も返しません。
3434

35-
#### Caveats {/*caveats*/}
35+
#### 注意点 {/*caveats*/}
3636

37-
- If multiple transitions are combined, all Transition Types are collected. You can also add more than one type to a Transition.
38-
- Transition Types are reset after each commit. This means a `<Suspense>` fallback will associate the types after a `startTransition`, but revealing the content does not.
37+
- 複数のトランジションがまとめて処理される場合、すべてのトランジションタイプが収集されます。1 つのトランジションに複数のタイプを追加することもできます。
38+
- トランジションタイプはコミットのたびにリセットされます。つまり、`startTransition` の後の `<Suspense>` フォールバックにはタイプが関連付けられますが、その後に表示されるコンテンツには関連付けられません。
3939

4040
---
4141

42-
## Usage {/*usage*/}
42+
## 使用法 {/*usage*/}
4343

44-
### Adding the cause of a transition {/*adding-the-cause-of-a-transition*/}
44+
### トランジションの原因を追加する {/*adding-the-cause-of-a-transition*/}
4545

46-
Call `addTransitionType` inside of `startTransition` to indicate the cause of a transition:
46+
`startTransition` の中で `addTransitionType` を呼び出し、トランジションの原因を明示します。
4747

4848
``` [[1, 6, "addTransitionType"], [2, 5, "startTransition", [3, 6, "'submit-click'"]]
4949
import { startTransition, addTransitionType } from 'react';
@@ -61,22 +61,22 @@ function Submit({action) {
6161
6262
```
6363

64-
When you call <CodeStep step={1}>addTransitionType</CodeStep> inside the scope of <CodeStep step={2}>startTransition</CodeStep>, React will associate <CodeStep step={3}>submit-click</CodeStep> as one of the causes for the Transition.
64+
<CodeStep step={2}>startTransition</CodeStep> のスコープ内で <CodeStep step={1}>addTransitionType</CodeStep> を呼び出すと、React は <CodeStep step={3}>submit-click</CodeStep> をそのトランジションの原因のひとつとして関連付けます。
6565

66-
Currently, Transition Types can be used to customize different animations based on what caused the Transition. You have three different ways to choose from for how to use them:
66+
現在、トランジションタイプは、トランジションの原因に応じてアニメーションを個別にカスタマイズするために使用できます。使い方は以下の 3 通りです。
6767

68-
- [Customize animations using browser view transition types](#customize-animations-using-browser-view-transition-types)
69-
- [Customize animations using `View Transition` Class](#customize-animations-using-view-transition-class)
70-
- [Customize animations using `ViewTransition` events](#customize-animations-using-viewtransition-events)
68+
- [ブラウザのビュー遷移タイプを使ってアニメーションをカスタマイズする](#customize-animations-using-browser-view-transition-types)
69+
- [ビュー遷移クラスを使ってアニメーションをカスタマイズする](#customize-animations-using-view-transition-class)
70+
- [`ViewTransition` イベントを使ってアニメーションをカスタマイズする](#customize-animations-using-viewtransition-events)
7171

72-
In the future, we plan to support more use cases for using the cause of a transition.
72+
将来的には、トランジションの原因を利用したユースケースをさらにサポートしていく予定です。
7373

7474
---
75-
### Customize animations using browser view transition types {/*customize-animations-using-browser-view-transition-types*/}
75+
### ブラウザのビュー遷移タイプを使ってアニメーションをカスタマイズする {/*customize-animations-using-browser-view-transition-types*/}
7676

77-
When a [`ViewTransition`](/reference/react/ViewTransition) activates from a transition, React adds all the Transition Types as browser [view transition types](https://www.w3.org/TR/css-view-transitions-2/#active-view-transition-pseudo-examples) to the element.
77+
トランジションによって [`ViewTransition`](/reference/react/ViewTransition) が起動すると、React はすべてのトランジションタイプを、ブラウザの[ビュー遷移タイプ (view transition types)](https://www.w3.org/TR/css-view-transitions-2/#active-view-transition-pseudo-examples) として要素に追加します。
7878

79-
This allows you to customize different animations based on CSS scopes:
79+
これにより、CSS のスコープに基づいてアニメーションを個別にカスタマイズできます。
8080

8181
```js [11]
8282
function Component() {
@@ -103,9 +103,9 @@ startTransition(() => {
103103

104104
---
105105

106-
### Customize animations using `View Transition` Class {/*customize-animations-using-view-transition-class*/}
106+
### ビュー遷移クラスを使ってアニメーションをカスタマイズする {/*customize-animations-using-view-transition-class*/}
107107

108-
You can customize animations for an activated `ViewTransition` based on type by passing an object to the View Transition Class:
108+
ビュー遷移クラスにオブジェクトを渡すことで、起動した `ViewTransition` のアニメーションをタイプに応じてカスタマイズできます。
109109

110110
```js
111111
function Component() {
@@ -125,9 +125,9 @@ startTransition(() => {
125125
});
126126
```
127127

128-
If multiple types match, then they're joined together. If no types match then the special "default" entry is used instead. If any type has the value "none" then that wins and the ViewTransition is disabled (not assigned a name).
128+
複数のタイプが一致した場合、それらは結合されます。一致するタイプがない場合は、代わりに特別な "default" エントリが使われます。いずれかのタイプの値が "none" の場合はそれが優先され、ViewTransition は無効化されます(名前が割り当てられません)。
129129

130-
These can be combined with enter/exit/update/layout/share props to match based on kind of trigger and Transition Type.
130+
これらを enter/exit/update/layout/share の各 props と組み合わせることで、トリガの種類とトランジションタイプの組み合わせに応じてアニメーションを指定できます。
131131

132132
```js
133133
<ViewTransition enter={{
@@ -142,9 +142,9 @@ exit={{
142142

143143
---
144144

145-
### Customize animations using `ViewTransition` events {/*customize-animations-using-viewtransition-events*/}
145+
### `ViewTransition` イベントを使ってアニメーションをカスタマイズする {/*customize-animations-using-viewtransition-events*/}
146146

147-
You can imperatively customize animations for an activated `ViewTransition` based on type using View Transition events:
147+
ビュー遷移イベントを使うことで、起動した `ViewTransition` のアニメーションを、タイプに応じて命令的にカスタマイズできます。
148148

149149
```
150150
<ViewTransition onUpdate={(inst, types) => {
@@ -158,4 +158,4 @@ You can imperatively customize animations for an activated `ViewTransition` base
158158
}}>
159159
```
160160

161-
This allows you to pick different imperative Animations based on the cause.
161+
これにより、原因に応じて異なるアニメーションを命令的に選択できます。

0 commit comments

Comments
 (0)