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
Copy file name to clipboardExpand all lines: pages/blog/tutorial/how-to-write-your-first-article.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ const Article = () => {
78
78
</li>
79
79
<li>
80
80
<b>thumbnail : </b>
81
-
Save the image file in public-images folder and paste the image path. This will be displayed in article cards on home page
81
+
Save the image file in public-images folder and paste the image path. This will be displayed in article cards on home page. For thumpbails the recommended size is <b>540x300px</b>.
import { BiAbacus, BiAdjust } from "react-icons/bi";
35
+
const Article = () => {
36
+
return (
37
+
{/*icons from Ant Icons*/}
38
+
<AiFillYoutube />
39
+
<AiFillTwitterCircle />
40
+
{/*icons from BoxIcons*/}
41
+
<BiAbacus />
42
+
<BiAdjust />
43
+
)
44
+
}
45
+
46
+
export default Article;
47
+
`
7
48
8
49
constIcons=()=>{
9
50
constPAGE_SEO: iSEO={
@@ -17,28 +58,42 @@ const Icons = () => {
17
58
<TexttitleclassName="text-3xl">
18
59
Icons
19
60
</Text>
20
-
<pclassName="mb-10 mt-5">
21
-
To use these icons, simply copy the text below the icon and paste in className in {"<i />"} tag, and to change the size and color of the icon use font attributes like text-sm or text-[12px] and text-blue-800 in className.
We have used <b><LinkTohref="https://react-icons.github.io/react-icons">ReactIcons</LinkTo></b> in this project, so you use the icons please check the <u><LinkTohref="https://react-icons.github.io/react-icons">official website</LinkTo></u>.
The above code block will show you the following icon. <br/>
73
+
<AiFillYoutube/>
74
+
{/*to change size*/}
75
+
<AiFillYoutubeclassName="text-[50px]"/>
76
+
{/*to change color*/}
77
+
<AiFillYoutubeclassName="text-[#631E9E]"/>
78
+
{/*to change color using tailwind css classes*/}
79
+
<AiFillYoutubeclassName="text-blue-600"/>
80
+
<Seperatordots/>
81
+
<TextsubtitleclassName="mt-5">
82
+
How to use different group/family of icons in ReactIcons,
83
+
</Text>
84
+
In react icons we have around 22 icons groups or types like <b>"Ant design icons, Bootstrap icons, Boxicons . . ."</b> etc. When you click on the sidebar list button we se a proper import statement and list of all icons in the icon group.
here we can see each icons in <b>BoxIcons</b> there is a <b>"Bi"</b> prefix i.e each icon in <b>BoxIcons</b> start with a <b>"Bi"</b> like <b>"BiAbacus, BiAdjust . . ."</b> etc. so when want to use any icon from BoxIcons you have to import the icon as <b>{'import { IconName } from "react-icons/bi";'}</b>
<b>Note* :</b> when you search any icon using the search option in react icons, all the icons from different groups will be displayed mixed so to know from where to import the icons see the first 2 letters of the icon name then import that icon group.
0 commit comments