Fix the tilerows by moving the items on feature sections out of divs
*only implemented for RSM and ClicksForms, fix will not be
auto-applied to any other feature svg tile row*
diff --git a/Components/TileRow.js b/Components/TileRow.js
index 408a18a..719ce87 100644
--- a/Components/TileRow.js
+++ b/Components/TileRow.js
@@ -1,23 +1,33 @@
-import react, { Component } from "react";
+import react, { Component, cloneElement } from "react";
import Styles from '../styles/tilerow.module.css';
class TileRow extends Component {
- constructor(props) {
- super(props);
- }
+ constructor(props) {
+ super(props);
+ }
+ render() {
+ return (
+ <div className={Styles.container}>
+ {
+ react.Children.toArray(this.props.children).map((item, index) => {
+ if (this.props.divless) {
+ const className = (item.props.className ? item.props.className + " " : "") + Styles.item
+ const key = index;
- render() {
- return (
- <div className={Styles.container}>
- {
- react.Children.toArray(this.props.children).map((item, index) => {
- return <div className={Styles.item} key={index}>{item}</div>
- })
- }
- </div>
- )
- }
+ const props = {
+ className,
+ key
+ }
+
+ return cloneElement(item, props);
+ } else {
+ return <div className={Styles.item + " " + Styles.fitItemWidth} key={index}>{item}</div>;
+ }
+ })
+ }
+ </div>
+ )
+ }
}
-
-export default TileRow;
\ No newline at end of file
+export default TileRow;