import classNames from 'classnames'; import React from 'react'; interface Props { className?: string; children: JSX.Element[]; equalWidth?: boolean; } export function ButtonGroup(props: Props) { // Attach props to children following this guide // https://stackoverflow.com/a/35102287 const { className, children, equalWidth } = props; const numChildren = children.length; const hasChildren = Boolean(numChildren); const firstChild = children[0]; const lastChild = children[numChildren - 1]; return (