Skip to content

Commit 70a8864

Browse files
committed
translate option page
1 parent 2e93dad commit 70a8864

1 file changed

Lines changed: 39 additions & 27 deletions

File tree

  • src/content/reference/react-dom/components

src/content/reference/react-dom/components/option.md

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ title: "<option>"
44

55
<Intro>
66

7-
The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option) lets you render an option inside a [`<select>`](/reference/react-dom/components/select) box.
7+
<div dir="rtl">
8+
9+
يتيح لك [مكون الـ `<option>` المدمج في المتصفح](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option) بعرض خيارات داخل مربع [`<select>`](/reference/react-dom/components/select).
10+
11+
</div>
812

913
```js
1014
<select>
11-
<option value="someOption">Some option</option>
12-
<option value="otherOption">Other option</option>
15+
<option value="someOption">بعض الخيارات</option>
16+
<option value="otherOption">خيارات أخرى</option>
1317
</select>
1418
```
1519

@@ -19,56 +23,65 @@ The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/
1923

2024
---
2125

22-
## Reference {/*reference*/}
26+
<div dir="rtl">
27+
28+
## المرجع {/*reference*/}
2329

2430
### `<option>` {/*option*/}
2531

26-
The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select) lets you render an option inside a [`<select>`](/reference/react-dom/components/select) box.
32+
يتيح لك [مكون الـ `<option>` المدمج في المتصفح](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option) بعرض خيارات داخل مربع [`<select>`](/reference/react-dom/components/select).
33+
</div>
2734

2835
```js
2936
<select>
30-
<option value="someOption">Some option</option>
31-
<option value="otherOption">Other option</option>
37+
<option value="someOption">بعض الخيارات</option>
38+
<option value="otherOption">خيارات أخرى</option>
3239
</select>
3340
```
3441

35-
[See more examples below.](#usage)
42+
<div dir="rtl">
43+
44+
[انظر الى المزيد من الأمثلة في الأسفل.](#usage)
3645

37-
#### Props {/*props*/}
46+
#### الخواص {/*props*/}
3847

39-
`<option>` supports all [common element props.](/reference/react-dom/components/common#props)
48+
تدعم `<option>` [جميع خواص العناصر الشائعة.](/reference/react-dom/components/common#props)
4049

41-
Additionally, `<option>` supports these props:
50+
بالإضافة إلى ذلك ، يدعم `<option>` هذه الخواص:
4251

43-
* [`disabled`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#disabled): A boolean. If `true`, the option will not be selectable and will appear dimmed.
44-
* [`label`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#label): A string. Specifies the meaning of the option. If not specified, the text inside the option is used.
45-
* [`value`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#value): The value to be used [when submitting the parent `<select>` in a form](/reference/react-dom/components/select#reading-the-select-box-value-when-submitting-a-form) if this option is selected.
52+
* [`disabled`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#disabled): قيمة منطقية. إذا كانت `true`، فلن يكون الخيار قابلاً للتحديد وسيظهر باهت.
4653

47-
#### Caveats {/*caveats*/}
54+
* [`label`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#label): سلسلة. تحدد معنى الخيار. إذا لم يتم تحديدها ، فسيتم استخدام النص الموجود داخل الخيار.
4855

49-
* React does not support the `selected` attribute on `<option>`. Instead, pass this option's `value` to the parent [`<select defaultValue>`](/reference/react-dom/components/select#providing-an-initially-selected-option) for an uncontrolled select box, or [`<select value>`](/reference/react-dom/components/select#controlling-a-select-box-with-a-state-variable) for a controlled select.
56+
* [`value`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#value): القيمة التي سيتم استخدامها [عند إرسال عنصر الأب `<select>` في النموذج](/reference/react-dom/components/select#reading-the-select-box-value-when-submitting-a-form) إذا تم تحديد هذا الخيار.
57+
58+
#### تنبيه {/*caveats*/}
59+
60+
* لا تدعم React سمة `selected` في `<option>`. بدلاً من ذلك ، قم بتمرير `value` هذا الخيار إلى العنصر الأب [`<select defaultValue>`](/reference/react-dom/components/select#providing-an-initially-selected-option) وذلك لمربع تحديد غير متحكم فيه، أو [`<select value>`](/reference/react-dom/components/select#controlling-a-select-box-with-a-state-variable) لمربع تحديد متحكم فيه.
5061

5162
---
5263

53-
## Usage {/*usage*/}
64+
## الاستخدام {/*usage*/}
5465

55-
### Displaying a select box with options {/*displaying-a-select-box-with-options*/}
66+
### عرض مربع التحديد مع الخيارات {/*displaying-a-select-box-with-options*/}
5667

57-
Render a `<select>` with a list of `<option>` components inside to display a select box. Give each `<option>` a `value` representing the data to be submitted with the form.
68+
قم بإنشاء `<select>` يتضمن داخله قائمة من مكونات `<option>` لعرض مربع تحديد. أعط كل `<option>` قيمة `<value>` تمثل البيانات التي سيتم رفعها مع النموذج.
5869

59-
[Read more about displaying a `<select>` with a list of `<option>` components.](/reference/react-dom/components/select)
70+
[اقرأ المزيد حول عرض `<select>` بقائمة مكونات `<option>`.](/reference/react-dom/components/select)
71+
72+
</div>
6073

6174
<Sandpack>
6275

6376
```js
6477
export default function FruitPicker() {
6578
return (
66-
<label>
67-
Pick a fruit:
79+
<label dir= "rtl" >
80+
اختر فاكهة:
6881
<select name="selectedFruit">
69-
<option value="apple">Apple</option>
70-
<option value="banana">Banana</option>
71-
<option value="orange">Orange</option>
82+
<option value="تفاح">تفاح</option>
83+
<option value="موز">موز</option>
84+
<option value="برتقال">برتقال</option>
7285
</select>
7386
</label>
7487
);
@@ -79,5 +92,4 @@ export default function FruitPicker() {
7992
select { margin: 5px; }
8093
```
8194

82-
</Sandpack>
83-
95+
</Sandpack>

0 commit comments

Comments
 (0)