From 88d934b54edaa1efb5c7ae3f974f10779e5c1de3 Mon Sep 17 00:00:00 2001 From: Vince Picone Date: Tue, 13 Apr 2021 15:20:05 -0500 Subject: [PATCH 1/4] fix: adjust tooltip alignment on last SVG card in row --- package.json | 4 ++-- .../SVGLibraries/IconLibrary/IconCategory.js | 5 +++-- .../SVGLibraries/IconLibrary/IconLibrary.js | 10 +++++++++- .../PictogramLibrary/PictogramCategory.js | 5 +++-- .../PictogramLibrary/PictogramLibrary.js | 3 +++ .../SVGLibraries/shared/ActionBar.js | 7 +++++-- src/components/SVGLibraries/shared/SvgCard.js | 3 ++- .../SVGLibraries/shared/useColumnCount.js | 18 ++++++++++++++++++ yarn.lock | 2 +- 9 files changed, 46 insertions(+), 11 deletions(-) create mode 100644 src/components/SVGLibraries/shared/useColumnCount.js diff --git a/package.json b/package.json index 97ad5d53428..45fe13a5d20 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,8 @@ "prop-types": "^15.7.2", "react": "^16.8.6", "react-copy-to-clipboard": "^5.0.1", - "react-live": "^2.2.1" + "react-live": "^2.2.1", + "use-media": "^1.4.0" }, "devDependencies": { "@babel/core": "^7.11.1", @@ -111,7 +112,6 @@ "prismjs": "^1.17.1", "react-dom": "^16.12.0", "react-ga": "^2.6.0", - "use-media": "^1.4.0", "use-resize-observer": "^4.0.0" }, "husky": { diff --git a/src/components/SVGLibraries/IconLibrary/IconCategory.js b/src/components/SVGLibraries/IconLibrary/IconCategory.js index b2dd02edc5d..273c71e962c 100644 --- a/src/components/SVGLibraries/IconLibrary/IconCategory.js +++ b/src/components/SVGLibraries/IconLibrary/IconCategory.js @@ -11,15 +11,16 @@ import { svgCategory, } from '../shared/SvgLibrary.module.scss'; -const IconCategory = ({ category, icons }) => { +const IconCategory = ({ category, icons, columnCount }) => { const [subCategoryRef, containerIsVisible] = useIntersectionObserver(); return (

{category}