You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is common for CSS classes to depend on the component props or state:
19
+
اینکه کلاس های CSS وابسته به props یا state کامپوننت باشند معمول است :
20
20
21
21
```jsx
22
22
render() {
@@ -28,24 +28,25 @@ render() {
28
28
}
29
29
```
30
30
31
-
>Tip
32
-
>
33
-
>If you often find yourself writing code like this, [classnames](https://www.npmjs.com/package/classnames#usage-with-reactjs)package can simplify it.
31
+
>راهنما
32
+
>
33
+
>اگر شما اغلب اوقات همچین کدی را می نویسید، پکیج [classnames](https://www.npmjs.com/package/classnames#usage-with-reactjs)می تواند آن را ساده تر کند.
34
34
35
-
### Can I use inline styles? {#can-i-use-inline-styles}
35
+
### آیا می توانم از استایل های درون خطی (inline styles) استفاده کنم؟ {#can-i-use-inline-styles}
36
36
37
-
Yes, see the docs on styling [here](/docs/dom-elements.html#style).
37
+
بله، اسناد مربوط به طراحی ظاهر را [اینجا](/docs/dom-elements.html#style) ببینید.
38
38
39
-
### Are inline styles bad? {#are-inline-styles-bad}
39
+
### آیا استایل های درون خطی بد هستند؟ {#are-inline-styles-bad}
40
40
41
-
CSS classes are generally better for performance than inline styles.
41
+
کلاس های CSS معمولاً عملکرد بهتری نسبت به استایل های درون خطی دارند.
42
42
43
-
### What is CSS-in-JS? {#what-is-css-in-js}
43
+
### CSS در JS چیست ؟ {#what-is-css-in-js}
44
44
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 تشکیل شده است به جای اینکه داخل یک فایل خارجی تعریف شده باشد. مقایسه کتابخانه های CSS-in-JS را در [اینجا](https://github.com/MicheleBertoli/css-in-js) بخوانید.
46
46
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
+
_توجه داشته باشید که این عملکرد جزئی از ری اکت نمی باشد، بلکه توسط کتابخانه های شخص ثالث ارائه شده._ری اکت هیچ نظری درباره نحوه ی تعریف استایل ها ندارد؛ اگر شک و شبهه ای دارید، یک نقطه شروع خوب این است که استایل های خود را درون فایل جداگانه `*.css`تعریف کرده و طبق معمول با استفاده از[`className`](/docs/dom-elements.html#classname) به آن ها مراجعه کنید.
48
48
49
-
### Can I do animations in React? {#can-i-do-animations-in-react}
50
49
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) or [React Spring](https://github.com/react-spring/react-spring), for example.
50
+
### آیا می توانم با ری اکت انیمیشن انجام دهم؟ {#can-i-do-animations-in-react}
51
+
52
+
ری اکت میتواند برای قدرت بخشیدن به انیمیشن ها استفاده شود. به مثال های [React Transition Group](https://reactcommunity.org/react-transition-group/) و [React Motion](https://github.com/chenglou/react-motion) یا [React Spring](https://github.com/react-spring/react-spring)، نگاه بیاندازید.
0 commit comments