import * as React from 'react'; import { Shimmer, IShimmerStyleProps, IShimmerStyles, ShimmerElementsGroup, ShimmerElementType, mergeStyleSets, createTheme, ThemeProvider, } from '@fluentui/react'; const customThemeForShimmer = createTheme({ palette: { // palette slot used in Shimmer for main background neutralLight: '#bdd4ed', // palette slot used in Shimmer for tip of the moving wave neutralLighter: '#7AAFE7', // palette slot used in Shimmer for all the space around the shimmering elements white: '#0078D4', }, }); const shimmerElements = [ { type: ShimmerElementType.circle, height: 24 }, { type: ShimmerElementType.gap, width: '2%' }, { type: ShimmerElementType.line, height: 16, width: '20%' }, { type: ShimmerElementType.gap, width: '5%' }, { type: ShimmerElementType.line, height: 16, width: '20%' }, { type: ShimmerElementType.gap, width: '10%' }, { type: ShimmerElementType.line, height: 16, width: '15%' }, { type: ShimmerElementType.gap, width: '10%' }, { type: ShimmerElementType.line, height: 16 }, ]; const classNames = mergeStyleSets({ wrapper: { selectors: { '& > .ms-Shimmer-container': { margin: '10px 0', }, }, }, themedBackgroundWrapper: { padding: 20, margin: '10px 0', height: 100, boxSizing: 'border-box', display: 'flex', alignItems: 'center', justifyContent: 'stretch', // using the palette color to match the gaps and borders of the shimmer. background: customThemeForShimmer.palette.white, selectors: { '& > .ms-Shimmer-container': { flexGrow: 1, }, }, }, themedBackgroundWrapper2: { width: 400, height: 100, margin: '10px 0', display: 'flex', alignItems: 'center', justifyContent: 'center', // using the palette color to match the gaps and borders of the shimmer. background: customThemeForShimmer.palette.white, outline: `1px solid ${customThemeForShimmer.palette.neutralPrimary}`, outlineOffset: '-10px', }, indent: { paddingLeft: 18, }, }); // Passing a color to match the background color of the containing div. const getCustomElements = (backgroundColor?: string) => { return (