Refactor to using RNP & UI Updates.
This commit is contained in:
13
components/style-repeater/style-repeater.jsx
Normal file
13
components/style-repeater/style-repeater.jsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import React from "react";
|
||||
|
||||
export default function StyleRepeater({ childStyle, children }) {
|
||||
return (
|
||||
<>
|
||||
{React.Children.map(children, (child) =>
|
||||
React.cloneElement(child, {
|
||||
style: [child.props.style, childStyle],
|
||||
})
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user