@@ -16,9 +16,9 @@ export default {
1616 title : 'Skeleton' ,
1717} as Meta
1818
19- export const Basic : React . VFC = ( ) => < Skeleton count = { 5 } width = { 400 } />
19+ export const Basic : React . FC = ( ) => < Skeleton count = { 5 } width = { 400 } />
2020
21- export const Inline : React . VFC = ( ) => (
21+ export const Inline : React . FC = ( ) => (
2222 < SideBySide >
2323 < div >
2424 < Skeleton width = { 100 } inline style = { { marginRight : '0.5rem' } } />
@@ -30,13 +30,13 @@ export const Inline: React.VFC = () => (
3030 </ SideBySide >
3131)
3232
33- export const InlineWithText : React . VFC = ( ) => (
33+ export const InlineWithText : React . FC = ( ) => (
3434 < div >
3535 Some random text < Skeleton width = { 150 } inline /> Some more random text
3636 </ div >
3737)
3838
39- export const BlockWrapper : React . VFC = ( ) => (
39+ export const BlockWrapper : React . FC = ( ) => (
4040 < SideBySide >
4141 < Skeleton count = { 5 } wrapper = { Box } />
4242 < div >
@@ -52,7 +52,7 @@ function InlineWrapperWithMargin({ children }: PropsWithChildren<unknown>): Reac
5252 return < span style = { { marginRight : '0.25rem' } } > { children } </ span >
5353}
5454
55- export const InlineWrapper : React . VFC = ( ) => (
55+ export const InlineWrapper : React . FC = ( ) => (
5656 < div style = { { lineHeight : 1.5 } } >
5757 < SideBySide >
5858 < div >
@@ -77,7 +77,7 @@ export const InlineWrapper: React.VFC = () => (
7777 </ div >
7878)
7979
80- export const DifferentDurations : React . VFC = ( ) => (
80+ export const DifferentDurations : React . FC = ( ) => (
8181 < div style = { { width : 500 } } >
8282 < Skeleton duration = { 1 } />
8383 < Skeleton duration = { 2 } />
@@ -86,7 +86,7 @@ export const DifferentDurations: React.VFC = () => (
8686 </ div >
8787)
8888
89- export const DifferentWidths : React . VFC = ( ) => (
89+ export const DifferentWidths : React . FC = ( ) => (
9090 < div style = { { display : 'flex' , flexDirection : 'column' } } >
9191 < Skeleton />
9292 < Skeleton width = { 50 } />
@@ -96,7 +96,7 @@ export const DifferentWidths: React.VFC = () => (
9696 </ div >
9797)
9898
99- export const DifferentHeights : React . VFC = ( ) => (
99+ export const DifferentHeights : React . FC = ( ) => (
100100 < div style = { { display : 'flex' , flexDirection : 'column' } } >
101101 < Skeleton />
102102 < Skeleton height = { 200 } />
@@ -106,11 +106,21 @@ export const DifferentHeights: React.VFC = () => (
106106 </ div >
107107)
108108
109- export const CustomStyles : React . VFC = ( ) => (
109+ export const CustomStyles : React . FC = ( ) => (
110110 < Skeleton height = "100px" style = { { borderRadius : 10 , height : 50 , width : 50 } } />
111111)
112112
113- export const Circle : React . VFC = ( ) => < Skeleton height = { 50 } width = { 50 } circle />
113+ export const Circle : React . FC = ( ) => < Skeleton height = { 50 } width = { 50 } circle />
114+
115+ export const DecimalCount : React . FC = ( ) => < Skeleton count = { 3.5 } />
116+
117+ export const DecimalCountPercentWidth : React . FC = ( ) => (
118+ < Skeleton width = "50%" count = { 3.5 } />
119+ )
120+
121+ export const DecimalCountInline : React . FC = ( ) => (
122+ < Skeleton width = { 100 } inline count = { 3.5 } style = { { marginRight : '1rem' } } />
123+ )
114124
115125// Use https://bennettfeely.com/clippy/ to try out other shapes
116126const StarWrapper : React . FC < PropsWithChildren < unknown > > = ( { children } ) => (
@@ -127,7 +137,7 @@ const StarWrapper: React.FC<PropsWithChildren<unknown>> = ({ children }) => (
127137 </ div >
128138)
129139
130- export const Stars : React . VFC = ( ) => (
140+ export const Stars : React . FC = ( ) => (
131141 < Skeleton
132142 height = "100%"
133143 wrapper = { StarWrapper }
@@ -137,9 +147,9 @@ export const Stars: React.VFC = () => (
137147 />
138148)
139149
140- export const RightToLeft : React . VFC = ( ) => < Skeleton direction = "rtl" />
150+ export const RightToLeft : React . FC = ( ) => < Skeleton direction = "rtl" />
141151
142- export const DisableAnimation : React . VFC = ( ) => {
152+ export const DisableAnimation : React . FC = ( ) => {
143153 const [ enabled , setEnabled ] = useState ( true )
144154
145155 return (
@@ -158,7 +168,7 @@ export const DisableAnimation: React.VFC = () => {
158168 )
159169}
160170
161- export const PercentWidthInFlex : React . VFC = ( ) => (
171+ export const PercentWidthInFlex : React . FC = ( ) => (
162172 < div >
163173 < p >
164174 This is a test for{ ' ' }
@@ -179,7 +189,7 @@ export const PercentWidthInFlex: React.VFC = () => (
179189 </ div >
180190)
181191
182- export const FillEntireContainer : React . VFC = ( ) => (
192+ export const FillEntireContainer : React . FC = ( ) => (
183193 < div >
184194 < p >
185195 This is a test for{ ' ' }
@@ -231,7 +241,7 @@ function HeightComparison({
231241 )
232242}
233243
234- export const HeightQuirk : React . VFC = ( ) => (
244+ export const HeightQuirk : React . FC = ( ) => (
235245 < div >
236246 < p >
237247 This is a demonstration of a Skeleton quirk that was reported in{ ' ' }
@@ -287,7 +297,7 @@ export const HeightQuirk: React.VFC = () => (
287297 </ div >
288298)
289299
290- export const ShadowDOM : React . VFC = ( ) => {
300+ export const ShadowDOM : React . FC = ( ) => {
291301 const hostRef = useRef < HTMLDivElement | null > ( null )
292302 const [ portalDestination , setPortalDestination ] = useState < HTMLDivElement > ( )
293303
0 commit comments