@julseb-lib/react 0.0.10 → 0.0.11

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.
Files changed (74) hide show
  1. package/dist/index.cjs.js +1183 -1183
  2. package/dist/index.es.js +5455 -5125
  3. package/dist/index.umd.js +653 -653
  4. package/dist/lib/Mixins.tsx +2 -2
  5. package/dist/lib/components/Header/Header.tsx +11 -2
  6. package/dist/lib/components/Header/HeaderNav.tsx +14 -12
  7. package/dist/lib/components/Header/subtypes.ts +2 -3
  8. package/dist/lib/components/Header/types.ts +3 -3
  9. package/dist/lib/components/PageLayout/PageLayout.tsx +3 -1
  10. package/dist/lib/components/PageLayout/types.ts +1 -1
  11. package/dist/lib/context/Theme.context.tsx +3 -5
  12. package/dist/lib/context/Toaster/Toaster.context.tsx +4 -6
  13. package/dist/lib/context/Toaster/toast.reducer.ts +2 -2
  14. package/dist/lib/hooks/useClickOutside.tsx +2 -2
  15. package/dist/lib/hooks/useCopyToClipboard.tsx +1 -1
  16. package/dist/lib/hooks/useDebounce.tsx +1 -1
  17. package/dist/lib/hooks/useExportData.tsx +7 -2
  18. package/dist/lib/hooks/useFetch.tsx +1 -1
  19. package/dist/lib/hooks/useForm.tsx +2 -2
  20. package/dist/lib/hooks/useKeyPress.tsx +2 -2
  21. package/dist/lib/hooks/useMaxWidth.tsx +1 -1
  22. package/dist/lib/hooks/useMergeRefs.ts +2 -2
  23. package/dist/lib/hooks/useMinWidth.tsx +1 -1
  24. package/dist/lib/hooks/usePaginatedData.tsx +7 -2
  25. package/dist/lib/hooks/usePagination.tsx +2 -2
  26. package/dist/lib/hooks/useTouchScreen.tsx +1 -1
  27. package/dist/lib/hooks/useTranslation.tsx +1 -1
  28. package/dist/lib/icons/ArrowUp.tsx +2 -2
  29. package/dist/lib/icons/Bold.tsx +2 -2
  30. package/dist/lib/icons/Calendar.tsx +2 -2
  31. package/dist/lib/icons/CaretDown.tsx +2 -2
  32. package/dist/lib/icons/Check.tsx +2 -2
  33. package/dist/lib/icons/CheckCircle.tsx +2 -2
  34. package/dist/lib/icons/ChevronDown.tsx +2 -2
  35. package/dist/lib/icons/ChevronLeft.tsx +2 -2
  36. package/dist/lib/icons/ChevronRight.tsx +2 -2
  37. package/dist/lib/icons/ChevronUp.tsx +2 -2
  38. package/dist/lib/icons/Clipboard.tsx +2 -2
  39. package/dist/lib/icons/Clock.tsx +2 -2
  40. package/dist/lib/icons/Close.tsx +2 -2
  41. package/dist/lib/icons/CloseCircle.tsx +2 -2
  42. package/dist/lib/icons/Code.tsx +2 -2
  43. package/dist/lib/icons/CodeBlock.tsx +2 -2
  44. package/dist/lib/icons/Comment.tsx +2 -2
  45. package/dist/lib/icons/Drag.tsx +2 -2
  46. package/dist/lib/icons/Edit.tsx +2 -2
  47. package/dist/lib/icons/EditorCode.tsx +2 -2
  48. package/dist/lib/icons/EditorLive.tsx +2 -2
  49. package/dist/lib/icons/EditorPreview.tsx +2 -2
  50. package/dist/lib/icons/Hide.tsx +2 -2
  51. package/dist/lib/icons/Image.tsx +2 -2
  52. package/dist/lib/icons/Italic.tsx +2 -2
  53. package/dist/lib/icons/Link.tsx +2 -2
  54. package/dist/lib/icons/Minus.tsx +2 -2
  55. package/dist/lib/icons/OrderedList.tsx +2 -2
  56. package/dist/lib/icons/Plus.tsx +2 -2
  57. package/dist/lib/icons/Quote.tsx +2 -2
  58. package/dist/lib/icons/Search.tsx +2 -2
  59. package/dist/lib/icons/Send.tsx +2 -2
  60. package/dist/lib/icons/Separator.tsx +2 -2
  61. package/dist/lib/icons/Show.tsx +2 -2
  62. package/dist/lib/icons/Star.tsx +2 -2
  63. package/dist/lib/icons/StarFull.tsx +2 -2
  64. package/dist/lib/icons/Strikethrough.tsx +2 -2
  65. package/dist/lib/icons/Underline.tsx +2 -2
  66. package/dist/lib/icons/UnorderedList.tsx +2 -2
  67. package/dist/lib/lib-utils/append-styles.ts +1 -1
  68. package/dist/lib/lib-utils/get-icon-size-from-font.ts +1 -1
  69. package/dist/lib/lib-utils/round-icon-size.ts +1 -1
  70. package/dist/lib/lib-utils/transfom-search-keys.ts +1 -1
  71. package/dist/lib/utils/StyleSheetManager.tsx +4 -3
  72. package/dist/lib/utils/linkify-text.tsx +1 -1
  73. package/dist/lib/utils/set-default-theme.ts +1 -1
  74. package/package.json +2 -1
@@ -51,10 +51,10 @@ type ILibIconMixin = {
51
51
  $isLibIcon?: boolean
52
52
  }
53
53
 
54
- function getColorMixinFromTheme(
54
+ const getColorMixinFromTheme = (
55
55
  theme: DefaultTheme | null = COLORS_LIGHT,
56
56
  themeName?: LibThemeNames
57
- ) {
57
+ ) => {
58
58
  let THEME: DefaultTheme
59
59
 
60
60
  if (themeName) {
@@ -52,6 +52,7 @@ export const Header = forwardRef<HTMLDivElement, ILibHeader>(
52
52
  position = "relative",
53
53
  hideOnScroll,
54
54
  links,
55
+ nav,
55
56
  enableScrollingOpen,
56
57
  ...rest
57
58
  },
@@ -171,7 +172,11 @@ export const Header = forwardRef<HTMLDivElement, ILibHeader>(
171
172
  {typeof logo === "object" ? logo.text : logo}
172
173
  </HeaderLogo>
173
174
 
174
- {navDesktopVariant === "left" && <HeaderNav {...navProps} />}
175
+ {navDesktopVariant === "left" && nav ? (
176
+ nav
177
+ ) : (
178
+ <HeaderNav {...navProps} />
179
+ )}
175
180
 
176
181
  {!isMobile && navDesktopVariant === "right" && (
177
182
  <HeaderSearch {...searchProps} />
@@ -181,7 +186,11 @@ export const Header = forwardRef<HTMLDivElement, ILibHeader>(
181
186
  <HeaderBurger {...burgerProps} />
182
187
  )}
183
188
 
184
- {navDesktopVariant === "right" && <HeaderNav {...navProps} />}
189
+ {navDesktopVariant === "right" && nav ? (
190
+ nav
191
+ ) : (
192
+ <HeaderNav {...navProps} />
193
+ )}
185
194
 
186
195
  {isMobile && navMobileVariant === "drawer" && (
187
196
  <Overlay
@@ -1,6 +1,6 @@
1
1
  /*=============================================== HeaderNav ===============================================*/
2
2
 
3
- import { useRef, type ReactNode } from "react"
3
+ import { useRef, isValidElement, type ReactNode, Fragment } from "react"
4
4
  import classNames from "classnames"
5
5
  import { uuid } from "ts-utils-julseb"
6
6
  import { useMaxWidth, useClickOutside } from "../../"
@@ -8,6 +8,7 @@ import { HeaderNavLink } from "./HeaderNavLink"
8
8
  import { HeaderSearch } from "./HeaderSearch"
9
9
  import { Nav } from "./styles"
10
10
  import type { ILibHeaderNav } from "./subtypes"
11
+ import { LibHeaderLink } from "../../types"
11
12
 
12
13
  export function HeaderNav({
13
14
  "data-testid": testid,
@@ -16,7 +17,6 @@ export function HeaderNav({
16
17
  isOpen,
17
18
  children,
18
19
  links,
19
- nav,
20
20
  headerHeight,
21
21
  variant,
22
22
  navMobileVariant,
@@ -64,18 +64,20 @@ export function HeaderNav({
64
64
  )}
65
65
 
66
66
  {links
67
- ? links.map(link => (
68
- <HeaderNavLink
69
- data-testid={testid}
70
- className={className}
71
- link={link}
72
- key={uuid()}
73
- />
74
- ))
67
+ ? links.map(link =>
68
+ isValidElement(link) ? (
69
+ <Fragment>{link}</Fragment>
70
+ ) : (
71
+ <HeaderNavLink
72
+ data-testid={testid}
73
+ className={className}
74
+ link={link as LibHeaderLink | JSX.Element}
75
+ key={uuid()}
76
+ />
77
+ )
78
+ )
75
79
  : null}
76
80
 
77
- {nav && (nav as any)}
78
-
79
81
  {children && children}
80
82
  </Nav>
81
83
  )
@@ -1,6 +1,6 @@
1
1
  /*=============================================== Header sub components types ===============================================*/
2
2
 
3
- import type { RefObject } from "react"
3
+ import type { FC, RefObject } from "react"
4
4
  import type { LibHeaderLink, LibLink } from "../../types"
5
5
  import type { ILibHeader } from "./types"
6
6
 
@@ -15,7 +15,6 @@ export interface ILibHeaderNav
15
15
  | "search"
16
16
  | "children"
17
17
  | "links"
18
- | "nav"
19
18
  | "variant"
20
19
  | "navMobileVariant"
21
20
  | "burgerPosition"
@@ -54,7 +53,7 @@ export interface ILibHeaderLogo
54
53
  export interface ILibHeaderNavLink {
55
54
  "data-testid": string | undefined
56
55
  className: string | undefined
57
- link: LibHeaderLink
56
+ link: LibHeaderLink | JSX.Element | FC
58
57
  }
59
58
 
60
59
  /*====================== HeaderSearch ======================*/
@@ -56,14 +56,14 @@ interface HeaderFixed extends ILibHeaderBase {
56
56
  type HeaderPosition = HeaderNotFixed | HeaderFixed
57
57
 
58
58
  type HeaderWithLinks = HeaderPosition & {
59
- links: Array<LibHeaderLink>
59
+ links: Array<LibHeaderLink | JSX.Element>
60
60
  nav?: never
61
61
  children?: never
62
62
  }
63
63
 
64
64
  type HeaderWithNav = HeaderPosition & {
65
- links?: never
66
- nav: JSX.Element | FC | ReactChildren
65
+ links: Array<LibHeaderLink | JSX.Element>
66
+ nav?: JSX.Element | FC
67
67
  children?: never
68
68
  }
69
69
 
@@ -57,7 +57,9 @@ export function PageLayout({
57
57
  ) : (
58
58
  <>
59
59
  {header && (
60
- <Header {...(header as any)} />
60
+ <Header {...(header as any)}>
61
+ {header?.nav && header?.nav}
62
+ </Header>
61
63
  )}
62
64
 
63
65
  {!noWrapper ? (
@@ -14,7 +14,7 @@ interface ILibPageLayoutBase {
14
14
  pageLoading?: ILibPageLoading
15
15
  titleLoading?: string
16
16
  helmet?: Omit<ILibHelmet, "children">
17
- header?: Omit<ILibHeader, "children">
17
+ header?: Omit<ILibHeader, "children"> & { nav?: JSX.Element }
18
18
  footer?: Omit<ILibFooter, "children">
19
19
  }
20
20
 
@@ -19,10 +19,10 @@ interface ILibThemeProvider {
19
19
  * @prop stylesheetManager?: boolean | IStyleSheetManager => import IStyleSheetManager from "styled-components"
20
20
  * @prop children?: ReactChildren
21
21
  */
22
- export function ThemeProviderWrapper({
22
+ export const ThemeProviderWrapper = ({
23
23
  children,
24
24
  stylesheetManager,
25
- }: ILibThemeProvider) {
25
+ }: ILibThemeProvider) => {
26
26
  const [selectedTheme, setSelectedTheme] = useState<
27
27
  LibThemeNames | undefined
28
28
  >(undefined)
@@ -91,6 +91,4 @@ export function ThemeProviderWrapper({
91
91
  * @prop selectedTheme: "light" | "dark" | undefined
92
92
  * @prop toggleTheme: () => void
93
93
  */
94
- export function useLibTheme() {
95
- return useContext(ThemeContext) as ILibThemeContext
96
- }
94
+ export const useLibTheme = () => useContext(ThemeContext) as ILibThemeContext
@@ -1,7 +1,7 @@
1
1
  /*=============================================== Toaster context ===============================================*/
2
2
 
3
3
  import { createContext, useReducer, useContext } from "react"
4
- import { uuid } from "ts-utils-julseb"
4
+ import { uuid } from "@julseb-lib/utils"
5
5
  import { Toaster } from "../../components/Toast/Toaster"
6
6
  import { toastReducer } from "./toast.reducer"
7
7
  import type {
@@ -47,13 +47,13 @@ const initialState = {
47
47
  * @prop toastOptions?: { duration?: number; labelClose?: string; withTimer?: boolean }
48
48
  * @prop position?: "top-left" | "top-right" | "bottom-left" | "bottom-right"
49
49
  */
50
- export function ToasterProviderWrapper({
50
+ export const ToasterProviderWrapper = ({
51
51
  "data-testid": testid,
52
52
  className,
53
53
  children,
54
54
  toastOptions,
55
55
  position,
56
- }: ILibToasterProvider) {
56
+ }: ILibToasterProvider) => {
57
57
  const [state, dispatch] = useReducer(toastReducer, initialState)
58
58
 
59
59
  const addToast = (
@@ -127,6 +127,4 @@ export function ToasterProviderWrapper({
127
127
  * @function loading
128
128
  * @function remove
129
129
  */
130
- export function useToast() {
131
- return useContext(ToastContext) as ILibToasterContext
132
- }
130
+ export const useToast = () => useContext(ToastContext) as ILibToasterContext
@@ -4,13 +4,13 @@ import type { LibToast } from "../../types"
4
4
 
5
5
  type ToastAction = "ADD_TOAST" | "DELETE_TOAST"
6
6
 
7
- export function toastReducer(
7
+ export const toastReducer = (
8
8
  state: { toasts: Array<LibToast> },
9
9
  action: {
10
10
  type: ToastAction
11
11
  payload: any
12
12
  }
13
- ) {
13
+ ) => {
14
14
  switch (action.type) {
15
15
  case "ADD_TOAST":
16
16
  return {
@@ -10,10 +10,10 @@ type Event = MouseEvent | TouchEvent
10
10
  * @argument ref: RefObject<T>,
11
11
  * @argument handler: (event: Event) => void
12
12
  */
13
- export function useClickOutside<T extends HTMLElement = HTMLElement>(
13
+ export const useClickOutside = <T extends HTMLElement = HTMLElement>(
14
14
  ref: RefObject<T>,
15
15
  handler: (event: Event) => void
16
- ) {
16
+ ) => {
17
17
  useEffect(() => {
18
18
  const listener = (e: Event) => {
19
19
  const target = e.target as HTMLElement
@@ -9,7 +9,7 @@ type CopyFn = (text: string) => Promise<boolean>
9
9
  * @description Hook to trigger a function to copy content
10
10
  * @link https://documentation-components-react.vercel.app/helpers/hooks#useCopyToClipboard
11
11
  */
12
- export function useCopyToClipboard(): [CopiedValue, CopyFn] {
12
+ export const useCopyToClipboard = (): [CopiedValue, CopyFn] => {
13
13
  const [copiedText, setCopiedText] = useState<CopiedValue>(null)
14
14
 
15
15
  const copy: CopyFn = async text => {
@@ -8,7 +8,7 @@ import { useState, useEffect } from "react"
8
8
  * @argument value: <T> => type to define
9
9
  * @argument delay?: number
10
10
  */
11
- export function useDebounce<T>(value: T, delay: number = 1000) {
11
+ export const useDebounce = <T,>(value: T, delay: number = 1000) => {
12
12
  const [debouncedValue, setDebouncedValue] = useState<T>(value)
13
13
 
14
14
  useEffect(() => {
@@ -1,6 +1,11 @@
1
1
  /*=============================================== useTableSorting ===============================================*/
2
2
 
3
- function downloadFile({ blob, fileName }: { blob: Blob; fileName: string }) {
3
+ interface IDownloadFile {
4
+ blob: Blob
5
+ fileName: string
6
+ }
7
+
8
+ const downloadFile = ({ blob, fileName }: IDownloadFile) => {
4
9
  const a = document.createElement("a")
5
10
  a.download = fileName
6
11
  a.href = window.URL.createObjectURL(blob)
@@ -17,7 +22,7 @@ function downloadFile({ blob, fileName }: { blob: Blob; fileName: string }) {
17
22
  * @description Hook to export data to JSON or CSV
18
23
  * @link https://documentation-components-react.vercel.app/helpers/hooks#useExportData
19
24
  */
20
- export function useExportData<T>() {
25
+ export const useExportData = <T,>() => {
21
26
  const exportToJson = (data: Array<T>, fileName: string) =>
22
27
  downloadFile({
23
28
  blob: new Blob([JSON.stringify(data)], {
@@ -8,7 +8,7 @@ import { useEffect, useState } from "react"
8
8
  * @argument fetchFunction: Promise<T> => to define
9
9
  * @argument dependencies?: any
10
10
  */
11
- export function useFetch<T>(fetchFunction: Promise<T>, dependencies?: any) {
11
+ export const useFetch = <T,>(fetchFunction: Promise<T>, dependencies?: any) => {
12
12
  const [response, setResponse] = useState<T | null>(null)
13
13
  const [loading, setLoading] = useState(true)
14
14
  const [error, setError] = useState<any>(undefined)
@@ -8,10 +8,10 @@ import { useState, type ChangeEvent } from "react"
8
8
  * @argument initialState = {} as T => type to define
9
9
  * @argument onSubmit?: (formData: T) => void
10
10
  */
11
- export function useForm<T>(
11
+ export const useForm = <T,>(
12
12
  initialState = {} as T,
13
13
  onSubmit?: (formData: T) => void
14
- ) {
14
+ ) => {
15
15
  const [formData, setFormData] = useState(initialState)
16
16
 
17
17
  const handleInputs = (e: ChangeEvent<HTMLInputElement>) =>
@@ -8,11 +8,11 @@ import { useEffect } from "react"
8
8
  * @argument keyCodes: string | Array<string>
9
9
  * @argument callback: () => void
10
10
  */
11
- export function useKeyPress(
11
+ export const useKeyPress = (
12
12
  keyCodes: string | Array<string>,
13
13
  callback: () => void,
14
14
  excludeKeys?: Array<string>
15
- ): void {
15
+ ): void => {
16
16
  useEffect(() => {
17
17
  const singleHandler = ({ code }: KeyboardEvent) => {
18
18
  if (keyCodes.includes(code)) {
@@ -7,7 +7,7 @@ import { useState, useEffect } from "react"
7
7
  * @link https://documentation-components-react.vercel.app/helpers/hooks#useMaxWidth
8
8
  * @argument width: number
9
9
  */
10
- export function useMaxWidth(width: number): boolean {
10
+ export const useMaxWidth = (width: number): boolean => {
11
11
  const [isMax, setIsMax] = useState<boolean>(false)
12
12
 
13
13
  useEffect(() => {
@@ -12,9 +12,9 @@ import {
12
12
  * @link https://documentation-components-react.vercel.app/helpers/hooks#useMergeRefs
13
13
  * @argument refs: Array<Ref<Instance> | undefined>
14
14
  */
15
- export function useMergeRefs<Instance>(
15
+ export const useMergeRefs = <Instance>(
16
16
  refs: Array<Ref<Instance> | undefined>
17
- ): RefCallback<Instance> | null {
17
+ ): RefCallback<Instance> | null => {
18
18
  return useMemo(() => {
19
19
  if (refs.every(ref => ref == null)) {
20
20
  return null
@@ -7,7 +7,7 @@ import { useState, useEffect } from "react"
7
7
  * @link https://documentation-components-react.vercel.app/helpers/hooks#useMinWidth
8
8
  * @argument width: number
9
9
  */
10
- export function useMinWidth(width: number): boolean {
10
+ export const useMinWidth = (width: number): boolean => {
11
11
  const [isMin, setIsMin] = useState<boolean>(false)
12
12
 
13
13
  useEffect(() => {
@@ -2,16 +2,21 @@
2
2
 
3
3
  import { useSearchParams } from "react-router-dom"
4
4
 
5
+ interface IUsePaginatedData<T> {
6
+ paginatedData: Array<T>
7
+ totalPages: number
8
+ }
9
+
5
10
  /**
6
11
  * @description Hook to use with Pagination or Paginator components
7
12
  * @link https://documentation-components-react.vercel.app/helpers/hooks#usePaginatedData
8
13
  * @argument data: Array<T> => to define
9
14
  * @argument defaultLimit?: number
10
15
  */
11
- export function usePaginatedData<T>(
16
+ export const usePaginatedData = <T,>(
12
17
  data: Array<T>,
13
18
  defaultLimit = 20
14
- ): { paginatedData: Array<T>; totalPages: number } {
19
+ ): IUsePaginatedData<T> => {
15
20
  const [query] = useSearchParams()
16
21
  const page = query.get("page") || 1
17
22
  const currentPage: number =
@@ -20,12 +20,12 @@ interface ILibUsePaginationNavigation {
20
20
  * @prop queries?: Array<Array<string>>
21
21
  * @prop totalPages?: number
22
22
  */
23
- export function usePagination({
23
+ export const usePagination = ({
24
24
  currentPage,
25
25
  setCurrentPage,
26
26
  queries,
27
27
  totalPages,
28
- }: ILibUsePaginationNavigation) {
28
+ }: ILibUsePaginationNavigation) => {
29
29
  const [_, setSearchParams] = useSearchParams()
30
30
 
31
31
  const handlePrev = useCallback(() => {
@@ -6,7 +6,7 @@ import { useState, useLayoutEffect } from "react"
6
6
  * @description Hook to detect if the device is a touch screen
7
7
  * @link https://documentation-components-react.vercel.app/helpers/hooks#useTouchScreen
8
8
  */
9
- export function useTouchScreen(): boolean {
9
+ export const useTouchScreen = (): boolean => {
10
10
  const [isTouchScreen, setIsTouchScreen] = useState<boolean>(false)
11
11
 
12
12
  useLayoutEffect(() => {
@@ -11,7 +11,7 @@ let currentLanguage = detectLanguage() || "en"
11
11
  * @link https://documentation-components-react.vercel.app/helpers/hooks#useTranslation
12
12
  * @argument translations: [language: string]: { [key: string]: string }
13
13
  */
14
- export function useTranslation(translations: TranslateLang) {
14
+ export const useTranslation = (translations: TranslateLang) => {
15
15
  const [language, setLanguage] = useState<string>(currentLanguage)
16
16
  const languages = Object.keys(translations)
17
17
 
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function ArrowUp({
6
+ export const ArrowUp = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function Bold({
6
+ export const Bold = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function Calendar({
6
+ export const Calendar = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function CaretDown({
6
+ export const CaretDown = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function Check({
6
+ export const Check = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function CheckCircle({
6
+ export const CheckCircle = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function ChevronDown({
6
+ export const ChevronDown = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function ChevronLeft({
6
+ export const ChevronLeft = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function ChevronRight({
6
+ export const ChevronRight = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function ChevronUp({
6
+ export const ChevronUp = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function Clipboard({
6
+ export const Clipboard = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function Clock({
6
+ export const Clock = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}
@@ -3,13 +3,13 @@
3
3
  import { StyledIcon } from "./styles"
4
4
  import type { ILibIcon } from "./types"
5
5
 
6
- export function Close({
6
+ export const Close = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  size = 64,
10
10
  color = "currentColor",
11
11
  ...rest
12
- }: ILibIcon) {
12
+ }: ILibIcon) => {
13
13
  return (
14
14
  <StyledIcon
15
15
  data-testid={testid}