@modernpoacher/gremlins 0.0.113 → 0.0.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/gremlins",
3
- "version": "0.0.113",
3
+ "version": "0.0.115",
4
4
  "description": "Gremlins",
5
5
  "keywords": [
6
6
  "Gremlins",
@@ -30,7 +30,7 @@
30
30
  "pregulp": "npm run nvm",
31
31
  "gulp": "gulp --color",
32
32
  "prelint": "npm run nvm",
33
- "lint": "cross-env NODE_ENV=production eslint . .storybook --ext .mjs,.cjs,.jsx,.mts,.cts",
33
+ "lint": "eslint . .storybook --ext .mjs,.cjs,.jsx,.mts,.cts",
34
34
  "lint:fix": "npm run lint -- --fix",
35
35
  "pretest": "npm run nvm",
36
36
  "test": "cross-env NODE_ENV=test jest",
@@ -57,9 +57,9 @@
57
57
  "@storybook/addon-links": "^7.6.17",
58
58
  "@storybook/react": "^7.6.17",
59
59
  "@storybook/react-webpack5": "^7.6.17",
60
- "@types/react": "^18.2.58",
61
- "@typescript-eslint/eslint-plugin": "^7.0.2",
62
- "@typescript-eslint/parser": "^7.0.2",
60
+ "@types/react": "^18.2.59",
61
+ "@typescript-eslint/eslint-plugin": "^7.1.0",
62
+ "@typescript-eslint/parser": "^7.1.0",
63
63
  "babel-plugin-module-resolver": "^5.0.0",
64
64
  "clean-webpack-plugin": "^4.0.0",
65
65
  "core-js": "^3.36.0",
@@ -11,14 +11,18 @@ import PropTypes from 'prop-types'
11
11
  * @param {TextContentProps}
12
12
  * @returns {React.JSX.Element}
13
13
  */
14
- const TextContent = ({ textContent }) => (
15
- <span className='text-content'>
16
- {textContent}
17
- </span>
18
- )
14
+ export default function TextContent ({ textContent }) {
15
+ if (textContent) {
16
+ return (
17
+ <span className='text-content'>
18
+ {textContent}
19
+ </span>
20
+ )
21
+ }
22
+
23
+ return null
24
+ }
19
25
 
20
26
  TextContent.propTypes = {
21
27
  textContent: PropTypes.string.isRequired
22
28
  }
23
-
24
- export default TextContent
package/src/index.d.cts CHANGED
@@ -92,7 +92,7 @@ declare module '@modernpoacher/gremlins/components/common/text-content' {
92
92
  textContent: string
93
93
  }
94
94
 
95
- export default function TextContent (props: TextContentProps): React.JSX.Element
95
+ export default function TextContent (props: TextContentProps): React.JSX.Element | null
96
96
  }
97
97
 
98
98
  declare module '@modernpoacher/gremlins/components/field' {