index.tsx 424 B

12345678910111213141516171819202122232425
  1. import React from 'react';
  2. import { Element } from './styled';
  3. export type Props = {
  4. variant: 'text' | 'rect' | 'circle';
  5. height?: number | string;
  6. width?: number | string;
  7. };
  8. const Skeleton: React.FunctionComponent<Props> = ({
  9. variant,
  10. height = 'auto',
  11. width = 'auto',
  12. }) => {
  13. return (
  14. <Element
  15. variant={variant}
  16. height={height}
  17. width={width}
  18. />
  19. );
  20. };
  21. export default Skeleton;