github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/ui/dashboard/src/components/dashboards/Placeholder/index.tsx (about) 1 import ReactPlaceholder from "react-placeholder"; 2 import "react-placeholder/lib/reactPlaceholder.css"; 3 4 type PlaceholderProps = { 5 animate?: boolean; 6 children: null | JSX.Element | JSX.Element[]; 7 ready: boolean; 8 type?: "rect" | "text" | "textRow" | "media" | "round" | undefined; 9 }; 10 11 const Placeholder = ({ 12 animate = true, 13 children, 14 ready, 15 type, 16 }: PlaceholderProps) => { 17 return ( 18 // @ts-ignore 19 <ReactPlaceholder 20 ready={ready} 21 rows={8} 22 type={type} 23 showLoadingAnimation={animate} 24 style={{ padding: "1em" }} 25 > 26 {children} 27 </ReactPlaceholder> 28 ); 29 }; 30 31 const component = { 32 type: "placeholder", 33 component: Placeholder, 34 }; 35 36 export default component;