chramos / react-native-skeleton-placeholder

SkeletonPlaceholder is a React Native library to easily create an amazing loading effect.
MIT License
679 stars 119 forks source link

styled components not working #42

Open turker0 opened 3 years ago

turker0 commented 3 years ago

Is there any way to use with styled components e.g. image

fulyakaya commented 3 years ago

i have the same issue if I pass styles directly it works, but when I try to use it with styled-components skelatonplaceholder.item's not displaying

export const StyledSkeletonView = styled(SkeletonPlaceholder.Item)<StyledSkeletonViewProps>
  ${({ $width, $height, $margin, $borderRadius }) => 
    width: ${$width};
    height: ${$height};
    margin: ${$margin || 0};
    border-radius: ${$borderRadius || 0};
  }
;
chramos commented 3 years ago

hey guys, unfortunately it is not supported yet, I have to work on a solution for that

cvburgess commented 3 years ago

Hey there! Is there anything we can do to add support for this? Is there an approach outline or the issue defined so we could help open a PR?