Explorar o código

add rounded-pill props to Skelton

yuken %!s(int64=3) %!d(string=hai) anos
pai
achega
8b24ab5382
Modificáronse 1 ficheiros con 6 adicións e 3 borrados
  1. 6 3
      packages/app/src/components/Skelton.tsx

+ 6 - 3
packages/app/src/components/Skelton.tsx

@@ -5,16 +5,19 @@ import styles from './Skelton.module.scss';
 type SkeltonProps = {
 type SkeltonProps = {
   width?: number,
   width?: number,
   height?: number,
   height?: number,
-  additionalClass?: string
+  additionalClass?: string,
+  roundedPill?: boolean,
 }
 }
 
 
 export const Skelton = (props: SkeltonProps): JSX.Element => {
 export const Skelton = (props: SkeltonProps): JSX.Element => {
-  const { width, height, additionalClass } = props;
+  const {
+    width, height, additionalClass, roundedPill,
+  } = props;
 
 
   const style = {
   const style = {
     width,
     width,
     height,
     height,
   };
   };
 
 
-  return <div style={style} className={`${styles['grw-skelton']} ${additionalClass}`}></div>;
+  return <div style={style} className={`${styles['grw-skelton']} ${additionalClass} ${roundedPill ? 'rounded-pill' : ''}`}></div>;
 };
 };