Skip to content

Commit 6e1bad8

Browse files
author
Abolfazl Rezvani Naraqi
authored
Merge pull request #145 from sadeghbarati/Styling-and-CSS
FAQ: Styling and CSS Translated
2 parents 88ea357 + eaed6a6 commit 6e1bad8

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

content/docs/faq-styling.md

+16-15
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ layout: docs
66
category: FAQ
77
---
88

9-
### How do I add CSS classes to components? {#how-do-i-add-css-classes-to-components}
9+
### چگونه می توانم کلاس های CSS را به کامپوننت ها اضافه کنم؟ {#how-do-i-add-css-classes-to-components}
1010

11-
Pass a string as the `className` prop:
11+
متنی به عنوان prop به `className` اختصاص می دهیم.
1212

1313
```jsx
1414
render() {
1515
return <span className="menu navigation-menu">Menu</span>
1616
}
1717
```
1818

19-
It is common for CSS classes to depend on the component props or state:
19+
اینکه کلاس های CSS وابسته به props یا state کامپوننت باشند معمول است :
2020

2121
```jsx
2222
render() {
@@ -28,24 +28,25 @@ render() {
2828
}
2929
```
3030

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) می تواند آن را ساده تر کند.
3434
35-
### Can I use inline styles? {#can-i-use-inline-styles}
35+
### آیا می توانم از استایل های درون خطی (inline styles) استفاده کنم؟ {#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 در 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 تشکیل شده است به جای اینکه داخل یک فایل خارجی تعریف شده باشد. مقایسه کتابخانه های CSS-in-JS را در [اینجا](https://github.com/MicheleBertoli/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+
_توجه داشته باشید که این عملکرد جزئی از ری اکت نمی باشد، بلکه توسط کتابخانه های شخص ثالث ارائه شده._ ری اکت هیچ نظری درباره نحوه ی تعریف استایل ها ندارد؛ اگر شک و شبهه ای دارید، یک نقطه شروع خوب این است که استایل های خود را درون فایل جداگانه `*.css` تعریف کرده و طبق معمول با استفاده از [`className`](/docs/dom-elements.html#classname) به آن ها مراجعه کنید.
4848

49-
### Can I do animations in React? {#can-i-do-animations-in-react}
5049

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

Comments
 (0)