@modernpoacher/cogs 0.1.61 → 0.1.63

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/cogs",
3
- "version": "0.1.61",
3
+ "version": "0.1.63",
4
4
  "description": "Cogs",
5
5
  "keywords": [
6
6
  "Cogs",
@@ -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.60",
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",
@@ -71,7 +71,7 @@
71
71
  "eslint-plugin-react": "^7.33.2",
72
72
  "husky": "^9.0.11",
73
73
  "jest": "^29.7.0",
74
- "mini-css-extract-plugin": "^2.8.0",
74
+ "mini-css-extract-plugin": "^2.8.1",
75
75
  "postcss": "^8.4.35",
76
76
  "postcss-import": "^16.0.1",
77
77
  "postcss-loader": "^8.1.0",
@@ -5,5 +5,5 @@ declare module '@modernpoacher/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
package/src/index.d.mts CHANGED
@@ -10,12 +10,6 @@ declare namespace CogsTypes {
10
10
  }
11
11
  }
12
12
 
13
- declare module '@modernpoacher/cogs/cogs/textarea/title' {
14
- import Title from '@modernpoacher/cogs/components/title'
15
-
16
- export default class TextareaTitle extends Title {}
17
- }
18
-
19
13
  declare module '@modernpoacher/cogs' {
20
14
  export { default as CheckboxCog } from '@modernpoacher/cogs/cogs/checkbox'
21
15
  export { default as EmailCog } from '@modernpoacher/cogs/cogs/email'