diff --git a/src/components/element-separator/element-separator.tsx b/src/components/element-separator/element-separator.tsx new file mode 100644 index 000000000..f9cb33021 --- /dev/null +++ b/src/components/element-separator/element-separator.tsx @@ -0,0 +1,22 @@ +import React, {Fragment} from "react"; + +export interface ElementSeparatorProps { + separator: React.ReactElement +} + +export const ElementSeparator: React.FC = ({children, separator}) => { + return ( + + { + React.Children.map(children, (child, index) => { + return + { + (index > 0) ? separator : null + } + {child} + + }) + } + + ) +} \ No newline at end of file