import React from 'react'; function Card(props) { const { number, name, children, iconClass, cardClass, } = props; let icons; try { React.Children.only(children); icons = (
{ children }
); } catch (e) { icons = (
{ React.Children.map(children, (child, index) => { let offset = 4 / (index + 1); offset = index === (React.Children.count(children) - 1) ? 0 : offset; return (
{ child }
); }) }
); } return (

{ number }

{ name }

{icons}
); } export default Card;