@@ -15,6 +15,9 @@ import DemoAvatarPickFile from "../../components/demo-components/avatar-demo/Dem
1515import CodeDemoAvatarPickFile from "../../components/demo-components/avatar-demo/CodeDemoAvatarPickFile" ;
1616import DemoAvatarFallBack from "../../components/demo-components/avatar-demo/DemoAvatarFallBack" ;
1717import CodeDemoAvatarFallBack from "../../components/demo-components/avatar-demo/CodeDemoAvatarFallBack" ;
18+ import AnchorToTab from "../../components/util-components/AnchorToTab" ;
19+ import DemoAvatarSmartImgFit from "../../components/demo-components/avatar-demo/DmoAvatarSmartImgFit" ;
20+ import CodeDemoAvatarSmartFit from "../../components/demo-components/avatar-demo/CodeDemoAvatarSmartFit" ;
1821
1922interface AvatarDemoPageProps { }
2023const AvatarDemoPage : React . FC < AvatarDemoPageProps > = (
@@ -92,12 +95,58 @@ const AvatarDemoPage: React.FC<AvatarDemoPageProps> = (
9295 display : "flex" ,
9396 width : "100%" ,
9497 justifyContent : "space-evenly" ,
98+ flexWrap : "wrap" ,
99+ gap : "5px" ,
95100 } }
96101 >
97102 < DemoAvatarFallBack />
98103 </ Paper >
99104 < CodeDemoAvatarFallBack />
100105 </ section >
106+
107+ < section id = "smart-image-fit" >
108+ < SubTitle content = "Smart image fit" />
109+ < DescParagraph >
110+ < CodeHighlight > Avatar</ CodeHighlight > with
111+ < TypeHighlight > smartImgFit</ TypeHighlight > prop will display image
112+ according to its heigh and width.
113+ < br />
114+ Image with height greater than its width has a "portrait"
115+ orientation. Otherwise it has a "landscape" orientation.
116+ < br />
117+ In Avatar component the default value is "center".
118+ </ DescParagraph >
119+
120+ < Paper
121+ variant = "outlined"
122+ style = { {
123+ padding : "25px" ,
124+ //padding:"auto",
125+ display : "flex" ,
126+ width : "100%" ,
127+ justifyContent : "space-evenly" ,
128+ flexWrap : "wrap" ,
129+ gap : "50px" ,
130+ } }
131+ >
132+ < DemoAvatarSmartImgFit />
133+ </ Paper >
134+
135+ < CodeDemoAvatarSmartFit />
136+ </ section >
137+
138+ < section id = "api" >
139+ < SubTitle content = "API" />
140+ < DescParagraph >
141+ See the documentation below for a complete reference to all of the
142+ props available to the components mentioned here.
143+ </ DescParagraph >
144+ < ul >
145+ < li >
146+ < AnchorToTab href = "/api/avatar" > { "<Avatar/>" } </ AnchorToTab >
147+ </ li >
148+ </ ul >
149+ </ section >
101150 </ MainContentContainer >
102151
103152 < RightMenuContainer >
@@ -127,7 +176,7 @@ const rightMenuItems = [
127176 {
128177 id : 4 ,
129178 label : "Smart image fit" ,
130- referTo : "/components/filemosaic #smart-image-fit" ,
179+ referTo : "/components/avatar #smart-image-fit" ,
131180 } ,
132181 {
133182 id : 5 ,
@@ -152,6 +201,6 @@ const rightMenuItems = [
152201 {
153202 id : 9 ,
154203 label : "API" ,
155- referTo : "/components/filecard #api" ,
204+ referTo : "/components/avatar #api" ,
156205 } ,
157206] ;
0 commit comments