diff --git a/src/HandMatrix.css b/src/HandMatrix.css index 5c1cf66..6db06fe 100644 --- a/src/HandMatrix.css +++ b/src/HandMatrix.css @@ -13,14 +13,19 @@ margin: 0; box-sizing: border-box; display: flex; - flex-flow: row wrap; + flex-flow: row; + flex-wrap: nowrap; + overflow: hidden; + width: 100%; } .hand-matrix-cell { border: 1px solid grey; display: inline-block; - font-size: 1em; touch-action: none; + font-size: 1rem; + width: 7.691%; + overflow: hidden; } @media screen and (max-width: 992px) { diff --git a/src/HandMatrix.js b/src/HandMatrix.js index 89b9ca8..708db19 100644 --- a/src/HandMatrix.js +++ b/src/HandMatrix.js @@ -1,5 +1,7 @@ -import React, { useState } from "react"; +import React from "react"; import PropTypes from 'prop-types'; +import { Textfit } from 'react-textfit'; + import "./HandMatrix.css"; export const combos = [ @@ -25,17 +27,16 @@ const chunk = (arr, size) => const ComboTile = React.memo( ({ - combo, - styles = {}, - comboSubtext = "", - showText = true, - colorize = true, - }) => { + combo, + styles = {}, + comboSubtext = "", + showText = true, + colorize = true, + }) => { return (