14 lines
280 B
JavaScript
14 lines
280 B
JavaScript
import React from "react";
|
|
|
|
export default function StyleRepeater({ childStyle, children }) {
|
|
return (
|
|
<>
|
|
{React.Children.map(children, (child) =>
|
|
React.cloneElement(child, {
|
|
style: [child.props.style, childStyle],
|
|
})
|
|
)}
|
|
</>
|
|
);
|
|
}
|