shinkansen-cogs 1.7.82 → 1.7.83

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/jsconfig.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": "./",
4
+ "paths": {
5
+ "shinkansen-cogs/*": [
6
+ "src/*",
7
+ "stories/*"
8
+ ]
9
+ }
10
+ }
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shinkansen-cogs",
3
- "version": "1.7.82",
3
+ "version": "1.7.83",
4
4
  "description": "Shinkansen Cogs",
5
5
  "keywords": [
6
6
  "Shinkansen",
@@ -58,7 +58,7 @@
58
58
  "@babel/register": "^7.23.7",
59
59
  "@modernpoacher/design-system": "1.0.134",
60
60
  "@modernpoacher/hooks": "^1.0.466",
61
- "@sequencemedia/gulp": "^1.1.164",
61
+ "@sequencemedia/gulp": "^1.1.165",
62
62
  "@sequencemedia/gulp-clean-css": "^1.0.85",
63
63
  "@sequencemedia/gulp-css-purge": "^1.1.83",
64
64
  "@sequencemedia/gulp-debug": "^1.0.88",
@@ -5,5 +5,5 @@ declare module 'shinkansen-cogs/components/common/text-content' {
5
5
  textContent: string
6
6
  }
7
7
 
8
- export default function TextContent (props: TextContentProps): React.JSX.Element
8
+ export default function TextContent (props: TextContentProps): React.JSX.Element | null
9
9
  }
@@ -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