Skip to content

Commit 52fddaf

Browse files
authored
Merge pull request #86 from maskeddeveloper/translation-faq-styling
[Done] Translating FAQ reference to faq-styling.md
2 parents 9799c06 + 7e500ba commit 52fddaf

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

content/docs/faq-styling.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
---
22
id: faq-styling
3-
title: Styling and CSS
3+
title: التنسيق واستخدام CSS
44
permalink: docs/faq-styling.html
55
layout: docs
66
category: FAQ
77
---
8+
9+
### كيف أُضيف أصناف CSS إلى المكوّنات؟ {#how-do-i-add-css-classes-to-components}
810

9-
### How do I add CSS classes to components? {#how-do-i-add-css-classes-to-components}
10-
11-
Pass a string as the `className` prop:
11+
مرِّر سلسلة نصيّة إلى خاصيّة اسم الصنف `className` :
1212

1313
```jsx
1414
render() {
15-
return <span className="menu navigation-menu">Menu</span>
15+
return <span className="menu navigation-menu">القائمة</span>
1616
}
1717
```
1818

19-
It is common for CSS classes to depend on the component props or state:
19+
من الشائع أن تعتمد أصناف CSS على خاصيّات أو حالة المكوّنات :
2020

2121
```jsx
2222
render() {
2323
let className = 'menu';
2424
if (this.props.isActive) {
2525
className += ' menu-active';
2626
}
27-
return <span className={className}>Menu</span>
27+
return <span className={className}>القائمة</span>
2828
}
2929
```
3030

31-
>Tip
31+
>ملاحظة
3232
>
33-
>If you often find yourself writing code like this, [classnames](https://www.npmjs.com/package/classnames#usage-with-reactjs) package can simplify it.
33+
>إن وجدت نفسك تكتب شيفرة مثل هذه، فتستطيع الحزمة, [classnames](https://www.npmjs.com/package/classnames#usage-with-reactjs) تبسيطها لك.
3434
35-
### Can I use inline styles? {#can-i-use-inline-styles}
35+
### هل أستطيع استخدام التنسيقات السطرية (inline)؟ {#can-i-use-inline-styles}
3636

37-
Yes, see the docs on styling [here](/docs/dom-elements.html#style).
37+
نعم، انظر إلى هذا التوثيق حول التنسيق [من هنا](/docs/dom-elements.html#style).
3838

39-
### Are inline styles bad? {#are-inline-styles-bad}
39+
### هل التنسيقات السطرية سيئة؟ {#are-inline-styles-bad}
4040

41-
CSS classes are generally better for performance than inline styles.
41+
تكون أصناف CSS أفضل بشكل عام للأداء من التنسيقات السطرية.
4242

43-
### What is CSS-in-JS? {#what-is-css-in-js}
43+
### ماذا يعني المصطلح CSS-in-JS? {#what-is-css-in-js}
4444

45-
"CSS-in-JS" refers to a pattern where CSS is composed using JavaScript instead of defined in external files. Read a comparison of CSS-in-JS libraries [here](https://github.com/MicheleBertoli/css-in-js).
45+
يُشير المصطلح CSS-in-JS إلى النمط الذي تُركَّب فيه CSS باستخدام JavaScript بدلًا من تعريفها في الملفّات الخارجيّة. اقرأ [من هنا ](https://github.com/MicheleBertoli/css-in-js) مقارنة بين مكتبات CSS-in-JS.
4646

47-
_Note that this functionality is not a part of React, but provided by third-party libraries._ React does not have an opinion about how styles are defined; if in doubt, a good starting point is to define your styles in a separate `*.css` file as usual and refer to them using [`className`](/docs/dom-elements.html#classname).
47+
لاحظ أنّ هذه الوظيفة ليست جزءًا من React ولكن تُزوّدنا بها مكتبات الطرف الثالث. ليس هناك رأي محدّد لمكتبة React حول كيفيّة تعريف التنسيقات. إن كنت مترددًا فأفضل نقطة للبدء هي تعريف تنسيقاتك في ملف ‎*.css منفصل كالعادة والإشارة إليها باستخدام الخاصيّة [`className`](/docs/dom-elements.html#classname).
4848

49-
### Can I do animations in React? {#can-i-do-animations-in-react}
49+
### هل بإمكاني إجراء تحريك في React؟ {#can-i-do-animations-in-react}
5050

51-
React can be used to power animations. See [React Transition Group](https://reactcommunity.org/react-transition-group/) and [React Motion](https://github.com/chenglou/react-motion), for example.
51+
يُمكِن استخدام React لدعم التحريك. انظر إلى مكتبة [React Transition Group](https://reactcommunity.org/react-transition-group/) ومكتبة [React Motion](https://github.com/chenglou/react-motion), على سبيل المثال.

0 commit comments

Comments
 (0)