From 2c41595b98b243ddc60fdb4e4b843425e07d7e5f Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Sat, 17 Sep 2022 21:42:30 +0400 Subject: [PATCH] ability to hide title --- package.json | 2 +- src/components/InflectionsTable.tsx | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 5f1ce04..d5a4aad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.9.5", + "version": "3.9.6", "author": "lingdocs.com", "description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations", "homepage": "https://verbs.lingdocs.com", diff --git a/src/components/InflectionsTable.tsx b/src/components/InflectionsTable.tsx index 036998b..f36b651 100644 --- a/src/components/InflectionsTable.tsx +++ b/src/components/InflectionsTable.tsx @@ -36,9 +36,10 @@ const explanation = (inf: T.Inflections | T.PluralInflections, textOptions: T.Te ; } -const InflectionTable = ({ inf, textOptions }: { +const InflectionTable = ({ inf, textOptions, hideTitle }: { inf: T.Inflections | T.PluralInflections, textOptions: T.TextOptions, + hideTitle?: boolean, }) => { const [showingExplanation, setShowingExplanation] = useState(false); /* istanbul ignore next */ // Insanely can't see the modal to close it @@ -46,13 +47,13 @@ const InflectionTable = ({ inf, textOptions }: { const handleShowExplanation = () => setShowingExplanation(true); const isPluralInfs = isPluralInflections(inf); return ( -
-
+
+ {!hideTitle &&
{!isPluralInfs &&
Inflections
} {!isPluralInfs &&
} -
+
} @@ -71,7 +72,7 @@ const InflectionTable = ({ inf, textOptions }: { ))}
- {!isPluralInfs && + {(!hideTitle && !isPluralInfs) && About {isPluralInfs ? "Inflections" : "Arabic Plural"}