diff --git a/package.json b/package.json index b2ad3fa..27efa78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "2.5.0", + "version": "2.5.1", "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/Examples.tsx b/src/components/Examples.tsx index a2c8964..8faa5f0 100644 --- a/src/components/Examples.tsx +++ b/src/components/Examples.tsx @@ -23,25 +23,22 @@ function EnglishContent({ children }: { children: (string | JSX.Element)[] | (st ; } -function Examples({ - children, - ex, - opts, - lineHeight, -}: { - ex?: PsStringWSub | PsStringWSub[] | T.PsJSX | T.PsJSX[], - children: PsStringWSub | PsStringWSub[], +function Examples(props: ({ + ex: T.PsJSX | T.PsJSX[] | PsStringWSub | PsStringWSub[], +} | { + children: T.PsJSX | T.PsJSX[] | PsStringWSub | PsStringWSub[], +}) & { opts: T.TextOptions, lineHeight?: 0 | 1 | 2 | 3 | 4, }) { - const examples = children || ex; + const examples = "children" in props ? props.children : props.ex; const Example = ({ children: text }: { children: PsStringWSub }) => ( -