Is your feature request related to a problem? Please describe.
I want to reuse skeleton layout cause I don't want to repeat the loader in all of my project.
Describe the solution you'd like
Support nested child layout, allow us to extract skeleton layout into components, then reuse it.
Describe alternatives you've considered
No.
Additional context
For example I have a global loader file, name `Loader.tsx. It contains
import React from "react";
import { ViewStyle } from "react-native";
import SkeletonContent from "react-native-skeleton-content";
type LoaderProps = {
children: React.ReactNode;
containerStyle?: ViewStyle;
};
export default function Loader(props: LoaderProps) {
const { children, containerStyle } = props;
return (
<SkeletonContent
containerStyle={containerStyle}
boneColor="#121212"
highlightColor="#333333"
animationType="pulse"
isLoading={true}
>
{children}
</SkeletonContent>
);
}
Then I'll have a layout name VideoCardLayout.tsx, it contains:
Is your feature request related to a problem? Please describe. I want to reuse skeleton layout cause I don't want to repeat the loader in all of my project.
Describe the solution you'd like Support nested child layout, allow us to extract skeleton layout into components, then reuse it.
Describe alternatives you've considered No.
Additional context For example I have a global loader file, name `Loader.tsx. It contains
Then I'll have a layout name
VideoCardLayout.tsx
, it contains:Then if I want to use the layout, I just do this:
Also, if I want to use
VideoCardLayout
to another layout, let sayCategoryLayout
, I'll do