Closed danyflorez closed 6 years ago
Hey @danyflorez, You can create a skeletonElement out of any React component, it doesn't need to be a primitive HTMLElement, although the component need to pass down the style
or className
prop to the dom element (which seems to be the case for material-ui). For example:
import Button from 'material-ui/Button';
import { createSkeletonElement } from '@trainline/react-skeletor';
const SkeletonButton = createSkeletonElement(Button, 'pending_css');
<SkeletonButton>My skeleton button</SkeletonButton>
@alex3165 Thank you!
@danyflorez No probs, let me know if you have any issue.
Hi,
I have been playing with your react-skeletor, it's a great solution btw, but what happen when there is not complete domain of the elements of the dom like in material-ui that has useful component? Can we still be able to use react-skeletor? How?
Thank you very much!