-
Notifications
You must be signed in to change notification settings - Fork 9
translate switch.md #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ id: switch | |
title: Switch | ||
--- | ||
|
||
Renders a boolean input. | ||
真偽値のインプットを描画します。 | ||
|
||
This is a controlled component that requires an `onValueChange` callback that updates the `value` prop in order for the component to reflect user actions. If the `value` prop is not updated, the component will continue to render the supplied `value` prop instead of the expected result of any user actions. | ||
ユーザーの操作を反映させるためには props の `value` を更新する必要があるため、`onValueChange`にコールバック関数を与えて `value` を更新させる必要があります。もし `value` が更新されない場合は、コンポーネントはユーザーの操作の結果期待される値の代わりに、渡された `value` を使い描画し続けてしまいます。 | ||
|
||
## Example | ||
|
||
|
@@ -49,35 +49,36 @@ export default App; | |
|
||
### [View Props](view.md#props) | ||
|
||
Inherits [View Props](view.md#props). | ||
[View Props](view.md#props)を継承しています。 | ||
|
||
--- | ||
|
||
### `disabled` | ||
|
||
If true the user won't be able to toggle the switch. | ||
true の場合、ユーザーは switch の値を変更できません。 | ||
|
||
| Type | Default | | ||
| 型 | デフォルト値 | | ||
| ---- | ------- | | ||
| bool | `false` | | ||
|
||
--- | ||
|
||
### `ios_backgroundColor` <div class="label ios">iOS</div> | ||
|
||
On iOS, custom color for the background. This background color can be seen either when the switch value is `false` or when the switch is disabled (and the switch is translucent). | ||
iOS 用の、カスタムバックグラウンドカラーです。このバックグラウンドカラーは、switch の value が false あるいは switch の disabled が true の時(switch は半透明になります)に反映されます。 | ||
|
||
| Type | | ||
|
||
| 型 | | ||
| ------------------ | | ||
| [color](colors.md) | | ||
|
||
--- | ||
|
||
### `onChange` | ||
|
||
Invoked when the user tries to change the value of the switch. Receives the change event as an argument. If you want to only receive the new value, use `onValueChange` instead. | ||
ユーザーが switch の値を変更しようとした時に呼び出されます。引数として change event を受け取る事ができます。もしも、変更後の値のみを受け取りたい場合は、代わりに `onValueChange` を使用してください。 | ||
|
||
| Type | | ||
| 型 | | ||
| -------- | | ||
| function | | ||
|
||
|
@@ -86,30 +87,33 @@ Invoked when the user tries to change the value of the switch. Receives the chan | |
### `onValueChange` | ||
|
||
Invoked when the user tries to change the value of the switch. Receives the new value as an argument. If you want to instead receive an event, use `onChange`. | ||
ユーザーが switch の値を変更しようとした時に呼び出されます。引数として変更後の値を受け取ります。もしも、値の代わりに event を受け取りたい場合は `onChange` を使用してください。 | ||
|
||
| Type | | ||
| 型 | | ||
| -------- | | ||
| function | | ||
|
||
--- | ||
|
||
### `thumbColor` | ||
|
||
Color of the foreground switch grip. If this is set on iOS, the switch grip will lose its drop shadow. | ||
switch のつまみの部分の色です。もし iOS でこのプロパティを設定した場合、つまみの drop shadow は消えます。 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. これはむずかしかったです・・・。つまみって言いますよね・・・?? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. つまみでしっくりきました👌 |
||
|
||
| Type | | ||
| 型 | | ||
| ------------------ | | ||
| [color](colors.md) | | ||
|
||
--- | ||
|
||
### `trackColor` | ||
|
||
Custom colors for the switch track. | ||
switch の可動域の色です。 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. これも難しいです・・・なにかいい言葉あればお教えください。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. track、難しいですね、、可動域でいいのではと思います! |
||
|
||
_iOS_: When the switch value is `false`, the track shrinks into the border. If you want to change the color of the background exposed by the shrunken track, use [`ios_backgroundColor`](switch.md#ios_backgroundColor). | ||
|
||
| Type | | ||
_iOS_: switch の value が false の時は可動域の色は境界の中まで縮小されてしまいます。もし、縮小してる状態の背景色を変更したい場合は[`ios_backgroundColor`](switch.md#ios_backgroundColor)を使用してください。 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ここも英文が残ってるようです |
||
|
||
| 型 | | ||
| --------------------------------------------------------------- | | ||
| object: { false: [color](colors.md), true: [color](colors.md) } | | ||
|
||
|
@@ -118,7 +122,8 @@ _iOS_: When the switch value is `false`, the track shrinks into the border. If y | |
### `value` | ||
|
||
The value of the switch. If true the switch will be turned on. Default value is false. | ||
switch の値です。もし true であれば switch はオンになります。デフォルト値は false です。 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ここも英文が残ってるようです |
||
|
||
| Type | | ||
| 型 | | ||
| ---- | | ||
| bool | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここも、英文が残ってるようです、、!