@julseb-lib/react 0.0.22 → 0.0.26

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.
@@ -89,6 +89,9 @@ export const AvatarFunction = forwardRef<
89
89
  width="100%"
90
90
  height="100%"
91
91
  fit="cover"
92
+ fallback={
93
+ typeof img === "object" ? img.fallback : undefined
94
+ }
92
95
  />
93
96
  )}
94
97
 
@@ -18,7 +18,7 @@ interface ILibAvatarBase extends LibComponentBase<HTMLSpanElement> {
18
18
  }
19
19
 
20
20
  interface AvatarWithImage extends ILibAvatarBase {
21
- img: string | { src: string; alt: string }
21
+ img: string | { src: string; alt: string; fallback?: string }
22
22
  letter?: never
23
23
  icon?: never
24
24
  iconSize?: never
@@ -15,7 +15,7 @@ interface ILibImageBase
15
15
  borderRadius?: ILibRadius
16
16
  fit?: CssObjectFit
17
17
  aspectRatio?: string
18
- fallback?: JSX.Element
18
+ fallback?: JSX.Element | string
19
19
  children?: never
20
20
  }
21
21
 
@@ -105,7 +105,7 @@ export const InputImage = forwardRef<HTMLInputElement, ILibInputImage>(
105
105
  onMouseEnter={handleMouseEnter}
106
106
  onMouseLeave={handleMouseLeave}
107
107
  >
108
- {value === "" ? (
108
+ {value === "" || !value ? (
109
109
  <EmptyContainer
110
110
  data-testid={testid}
111
111
  className={className}
@@ -1,14 +1,6 @@
1
1
  /*=============================================== PageLayout component ===============================================*/
2
2
 
3
- import {
4
- Helmet,
5
- Header,
6
- Wrapper,
7
- Main,
8
- Footer,
9
- PageLoading,
10
- ResetScroll,
11
- } from "../../"
3
+ import { Helmet, Header, Wrapper, Main, Footer, PageLoading } from "../../"
12
4
  import type { ILibPageLayout } from "./types"
13
5
 
14
6
  /**
@@ -83,8 +75,6 @@ export const PageLayout = ({
83
75
  {footer && <Footer {...(footer as any)} />}
84
76
  </>
85
77
  )}
86
-
87
- <ResetScroll />
88
78
  </>
89
79
  )
90
80
  }
@@ -81,6 +81,8 @@ export const Pagination = forwardRef<HTMLDivElement, ILibPagination>(
81
81
  const isMobile = useMaxWidth(600)
82
82
  const defaultGap = gap || isMobile ? "xxs" : "xs"
83
83
 
84
+ if (totalPages && totalPages <= 1) return null
85
+
84
86
  return (
85
87
  <Flexbox
86
88
  data-testid={testid}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@julseb-lib/react",
3
- "version": "0.0.22",
3
+ "version": "0.0.26",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "scripts": {