uibee 2.13.3 → 2.14.0

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.
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import InputLabel from './inputLabel';
3
3
  import InputInfo from './inputInfo';
4
4
  import InputError from './inputError';
5
+ import ReactMarkdown from 'react-markdown';
5
6
  export default function FieldWrapper({ label, name, required, info, error, description, textSize = 'sm', children, className, }) {
6
- return (_jsxs("div", { className: `flex flex-col gap-1 w-full relative ${className || ''}`, children: [(label || info) && (_jsxs("div", { className: 'flex items-center justify-between mb-1', children: [label && (_jsx(InputLabel, { label: label, name: name, required: required, className: `ml-1 ${textSize === 'sm' ? 'text-sm!' : 'text-base!'}` })), info && _jsx(InputInfo, { info: info })] })), description && (_jsx("p", { className: 'text-sm text-login-100 ml-1 mb-1', children: description })), children, _jsx(InputError, { error: error, id: `${name}-error` })] }));
7
+ return (_jsxs("div", { className: `flex flex-col gap-1 w-full relative ${className || ''}`, children: [(label || info) && (_jsxs("div", { className: 'flex items-center justify-between mb-1', children: [label && (_jsx(InputLabel, { label: label, name: name, required: required, className: `ml-1 ${textSize === 'sm' ? 'text-sm!' : 'text-base!'}` })), info && _jsx(InputInfo, { info: info })] })), description && (_jsx("p", { className: 'text-sm text-login-100 ml-1 mb-1', children: _jsx(ReactMarkdown, { children: String(description || '') }) })), children, _jsx(InputError, { error: error, id: `${name}-error` })] }));
7
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uibee",
3
- "version": "2.13.3",
3
+ "version": "2.14.0",
4
4
  "description": "Shared components, functions and hooks for reuse across Login projects",
5
5
  "homepage": "https://github.com/Login-Linjeforening-for-IT/uibee#readme",
6
6
  "bugs": {
@@ -2,6 +2,7 @@ import { ReactNode } from 'react'
2
2
  import InputLabel from './inputLabel'
3
3
  import InputInfo from './inputInfo'
4
4
  import InputError from './inputError'
5
+ import ReactMarkdown from 'react-markdown'
5
6
 
6
7
  interface FieldWrapperProps {
7
8
  label?: string
@@ -43,7 +44,7 @@ export default function FieldWrapper({
43
44
  )}
44
45
  {description && (
45
46
  <p className='text-sm text-login-100 ml-1 mb-1'>
46
- {description}
47
+ <ReactMarkdown>{String(description || '')}</ReactMarkdown>
47
48
  </p>
48
49
  )}
49
50
  {children}