uibee 2.7.3 → 2.7.5

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.
@@ -9,16 +9,16 @@ export default function Button({ text, className, icon, path, color, type, onCli
9
9
  ${bg} cursor-pointer px-4 rounded-md min-h-8 h-8 flex
10
10
  justify-evenly items-center gap-2 select-none
11
11
  focus:outline-none border-0 outline w-fit ${className}
12
- `, children: [_jsx("h1", { className: 'font-bold', children: icon || '' }), _jsx("h1", { className: 'w-fit', children: text })] }));
12
+ `, children: [_jsx("h1", { className: 'font-bold', children: icon || '' }), _jsx("h1", { className: 'min-w-fit w-fit', children: text })] }));
13
13
  }
14
14
  if (disabled) {
15
15
  return (_jsxs("div", { className: `
16
- ${bg} cursor-not-allowed px-4 rounded-md h-8 flex
17
- justify-evenly items-center gap-2 select-none
18
- `, children: [_jsx("h1", { className: 'font-bold', children: icon || '' }), _jsx("h1", { className: 'w-fit', children: text })] }));
16
+ ${bg} cursor-not-allowed px-4 rounded-md h-8 flex w-fit
17
+ justify-evenly items-center gap-2 select-none ${className}
18
+ `, children: [_jsx("h1", { className: 'font-bold', children: icon || '' }), _jsx("h1", { className: 'min-w-fit w-fit', children: text })] }));
19
19
  }
20
20
  return (_jsxs(Link, { href: path, className: `
21
- ${bg} cursor-pointer px-4 rounded-md h-8 flex
22
- justify-evenly items-center gap-2 select-none
23
- `, children: [_jsx("h1", { className: 'font-bold', children: icon || '' }), _jsx("h1", { className: 'w-fit', children: text })] }));
21
+ ${bg} cursor-pointer px-4 rounded-md h-8 flex w-fit
22
+ justify-evenly items-center gap-2 select-none ${className}
23
+ `, children: [_jsx("h1", { className: 'font-bold', children: icon || '' }), _jsx("h1", { className: 'min-w-fit w-fit', children: text })] }));
24
24
  }
@@ -558,6 +558,9 @@
558
558
  .min-w-70 {
559
559
  min-width: calc(var(--spacing) * 70);
560
560
  }
561
+ .min-w-fit {
562
+ min-width: fit-content;
563
+ }
561
564
  .flex-1 {
562
565
  flex: 1;
563
566
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uibee",
3
- "version": "2.7.3",
3
+ "version": "2.7.5",
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": {
@@ -40,7 +40,7 @@ export default function Button({
40
40
  `}
41
41
  >
42
42
  <h1 className='font-bold'>{icon || ''}</h1>
43
- <h1 className='w-fit'>{text}</h1>
43
+ <h1 className='min-w-fit w-fit'>{text}</h1>
44
44
  </button>
45
45
  )
46
46
  }
@@ -49,12 +49,12 @@ export default function Button({
49
49
  return (
50
50
  <div
51
51
  className={`
52
- ${bg} cursor-not-allowed px-4 rounded-md h-8 flex
53
- justify-evenly items-center gap-2 select-none
52
+ ${bg} cursor-not-allowed px-4 rounded-md h-8 flex w-fit
53
+ justify-evenly items-center gap-2 select-none ${className}
54
54
  `}
55
55
  >
56
56
  <h1 className='font-bold'>{icon || ''}</h1>
57
- <h1 className='w-fit'>{text}</h1>
57
+ <h1 className='min-w-fit w-fit'>{text}</h1>
58
58
  </div>
59
59
  )
60
60
  }
@@ -63,12 +63,12 @@ export default function Button({
63
63
  <Link
64
64
  href={path}
65
65
  className={`
66
- ${bg} cursor-pointer px-4 rounded-md h-8 flex
67
- justify-evenly items-center gap-2 select-none
66
+ ${bg} cursor-pointer px-4 rounded-md h-8 flex w-fit
67
+ justify-evenly items-center gap-2 select-none ${className}
68
68
  `}
69
69
  >
70
70
  <h1 className='font-bold'>{icon || ''}</h1>
71
- <h1 className='w-fit'>{text}</h1>
71
+ <h1 className='min-w-fit w-fit'>{text}</h1>
72
72
  </Link>
73
73
  )
74
74
  }