@@ -20,27 +20,32 @@ this feature using the `animateFill` prop.
2020-- -
2121type: example
2222-- -
23- < div>
24- < Rating
25- formatValueText= {function (currentRating , maxRating ) {
26- return currentRating + ' out of ' + maxRating
27- }}
28- label= " Overall rating of freshman year experience"
29- valueNow= {68.45 }
30- valueMax= {100 }
31- / >
32- < br / >
33- < Rating
34- animateFill
35- formatValueText= {function (currentRating , maxRating ) {
36- return currentRating + ' out of ' + maxRating
37- }}
38- label= " Overall rating of freshman year experience"
39- iconCount= {5 }
40- valueNow= {68.45 }
41- valueMax= {100 }
42- / >
43- < / div>
23+ < Flex gap= " large" >
24+ < Flex gap= " x-small" >
25+ < Rating
26+ formatValueText= {function (currentRating , maxRating ) {
27+ return currentRating + ' out of ' + maxRating
28+ }}
29+ label= " Overall rating of freshman year experience"
30+ valueNow= {68.45 }
31+ valueMax= {100 }
32+ / >
33+ < div> 2 / 3 < / div>
34+ < / Flex>
35+ < Flex gap= " x-small" >
36+ < Rating
37+ animateFill
38+ formatValueText= {function (currentRating , maxRating ) {
39+ return currentRating + ' out of ' + maxRating
40+ }}
41+ label= " Overall rating of freshman year experience"
42+ iconCount= {5 }
43+ valueNow= {68.45 }
44+ valueMax= {100 }
45+ / >
46+ < div> 3 / 5 < / div>
47+ < / Flex>
48+ < / Flex>
4449```
4550
4651### Sizes
@@ -52,30 +57,48 @@ space around the actual rating.
5257-- -
5358type: example
5459-- -
55- < div>
56- < Rating
57- label= " Product rating"
58- size= " small"
59- iconCount= {5 }
60- valueNow= {3.76 }
61- valueMax= {5 }
62- margin= " x-small medium xx-small none"
63- / >
64- < Rating
65- label= " Overall rating of college experience"
66- iconCount= {5 }
67- valueNow= {30 }
68- valueMax= {100 }
69- margin= " x-small xx-large"
70- / >
71- < Rating
72- animateFill
73- label= " Rating of professor"
74- size= " large"
75- iconCount= {5 }
76- valueNow= {8 }
77- valueMax= {8 }
78- margin= " medium"
79- / >
80- < / div>
60+ < Flex gap= " large" >
61+ < Flex>
62+ < Rating
63+ label= " Product rating"
64+ size= " small"
65+ iconCount= {5 }
66+ valueNow= {3.76 }
67+ valueMax= {5 }
68+ margin= " small" / >
69+ < div> 4 / 5 < / div>
70+ < / Flex>
71+ < Flex>
72+ < Rating
73+ label= " Overall rating of college experience"
74+ iconCount= {5 }
75+ valueNow= {30 }
76+ valueMax= {100 }
77+ margin= " small"
78+ / >
79+ < div> 2 / 5 < / div>
80+ < / Flex>
81+ < Flex>
82+ < Rating
83+ animateFill
84+ label= " Rating of professor"
85+ size= " large"
86+ iconCount= {5 }
87+ valueNow= {8 }
88+ valueMax= {8 }
89+ margin= " small" / >
90+ < div> 5 / 5 < / div>
91+ < / Flex>
92+ < / Flex>
93+ ```
94+
95+ ``` js
96+ -- -
97+ type: embed
98+ -- -
99+ < Guidelines>
100+ < Figure recommendation= " a11y" title= " Accessibility" >
101+ < Figure .Item > Display a textual value for the rating to meet WCAG 2.1 Use of Color standards. " Non-text information within controls that uses a change of hue alone to convey the value or state of an input, such as a 1-5 star indicator where state depends on whether it's filled or empty is likely to fail the Use of color criterion" < / Figure .Item >
102+ < / Figure>
103+ < / Guidelines>
81104```
0 commit comments