yuken 3 лет назад
Родитель
Сommit
532f07463b
1 измененных файлов с 4 добавлено и 9 удалено
  1. 4 9
      packages/app/src/components/Skelton.tsx

+ 4 - 9
packages/app/src/components/Skelton.tsx

@@ -3,28 +3,23 @@ import React from 'react';
 type SkeltonProps = {
 type SkeltonProps = {
   width?: number,
   width?: number,
   height?: number,
   height?: number,
-  componentClass?: string,
-  componentHeight?: number,
+  additionalClass?: string,
   roundedPill?: boolean,
   roundedPill?: boolean,
 }
 }
 
 
 export const Skelton = (props: SkeltonProps): JSX.Element => {
 export const Skelton = (props: SkeltonProps): JSX.Element => {
   const {
   const {
-    width, height, componentHeight, componentClass, roundedPill,
+    width, height, additionalClass, roundedPill,
   } = props;
   } = props;
 
 
-  const componentStyle = {
-    height: componentHeight,
-  };
-
   const skeltonStyle = {
   const skeltonStyle = {
     width,
     width,
     height,
     height,
   };
   };
 
 
   return (
   return (
-    <div style={componentStyle} className={`d-flex align-items-center ${componentClass}`}>
-      <div style={skeltonStyle} className={`grw-skelton ${roundedPill ? 'rounded-pill' : ''}`}></div>
+    <div style={skeltonStyle} className={`${additionalClass}`}>
+      <div className={`grw-skelton h-100 w-100 ${roundedPill ? 'rounded-pill' : ''}`}></div>
     </div>
     </div>
   );
   );
 };
 };