create-nextjs-cms 0.8.0 → 0.8.1

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": "create-nextjs-cms",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,8 +29,8 @@
29
29
  "tsx": "^4.20.6",
30
30
  "typescript": "^5.9.2",
31
31
  "@lzcms/eslint-config": "0.3.0",
32
- "@lzcms/tsconfig": "0.1.0",
33
- "@lzcms/prettier-config": "0.1.0"
32
+ "@lzcms/prettier-config": "0.1.0",
33
+ "@lzcms/tsconfig": "0.1.0"
34
34
  },
35
35
  "prettier": "@lzcms/prettier-config",
36
36
  "scripts": {
@@ -0,0 +1,8 @@
1
+ 'use client'
2
+
3
+ import {DynamicIcon} from 'lucide-react/dynamic'
4
+ import type { IconName } from 'lucide-react/dynamic'
5
+
6
+ export default function SectionIcon({ name, className }: { name: string; className?: string }) {
7
+ return <DynamicIcon name={name as IconName} className={className} />
8
+ }
@@ -3,8 +3,9 @@ import classNames from 'classnames'
3
3
  import { useState } from 'react'
4
4
  import { SidebarItemProps } from 'nextjs-cms/core/types'
5
5
  import { useAutoAnimate } from '@formkit/auto-animate/react'
6
- import { ChevronDownIcon, ChevronUpIcon, FolderIcon, PlusCircleIcon, PlusIcon } from 'lucide-react'
6
+ import { ChevronDownIcon, ChevronUpIcon, FolderIcon, PlusIcon } from 'lucide-react'
7
7
  import { useI18n } from 'nextjs-cms/translations/client'
8
+ import SectionIcon from '@/components/SectionIcon'
8
9
 
9
10
  export default function SidebarDropdownItem({ item, closeSideBar }: SidebarItemProps) {
10
11
  const t = useI18n()
@@ -22,8 +23,10 @@ export default function SidebarDropdownItem({ item, closeSideBar }: SidebarItemP
22
23
  onClick={() => setOpen((prev) => !prev)}
23
24
  >
24
25
  <li className='relative flex w-full items-center justify-between gap-2'>
25
- {/*<span>{item.icon}</span>*/}
26
- <span className='text-start'>{item.title}</span>
26
+ <span className='flex items-center gap-2 text-start'>
27
+ {item.icon && <SectionIcon name={item.icon} className='size-4' />}
28
+ <span>{item.title}</span>
29
+ </span>
27
30
  <span>
28
31
  {open ? (
29
32
  <ChevronUpIcon className='h-5 w-5' />
@@ -1,6 +1,7 @@
1
1
  import Link from 'next/link'
2
2
  import classNames from 'classnames'
3
3
  import { SidebarItemProps } from 'nextjs-cms/core/types'
4
+ import SectionIcon from '@/components/SectionIcon'
4
5
 
5
6
  export default function SidebarItem({ item, closeSideBar }: SidebarItemProps) {
6
7
  return (
@@ -14,7 +15,10 @@ export default function SidebarItem({ item, closeSideBar }: SidebarItemProps) {
14
15
  'text-start': true, // RTL support
15
16
  })}
16
17
  >
17
- <span>{item.title}</span>
18
+ <span className='flex items-center gap-2'>
19
+ {item.icon && <SectionIcon name={item.icon} className='size-4' />}
20
+ <span>{item.title}</span>
21
+ </span>
18
22
  </Link>
19
23
  )
20
24
  }
@@ -8,4 +8,4 @@ export const revalidate = 0
8
8
 
9
9
  // @refresh reset
10
10
 
11
- export const configLastUpdated = 1770880774270
11
+ export const configLastUpdated = 1771768058991
@@ -66,7 +66,7 @@
66
66
  "nanoid": "^5.1.2",
67
67
  "next": "16.1.1",
68
68
  "next-themes": "^0.4.6",
69
- "nextjs-cms": "0.8.0",
69
+ "nextjs-cms": "0.8.1",
70
70
  "plaiceholder": "^3.0.0",
71
71
  "prettier-plugin-tailwindcss": "^0.7.2",
72
72
  "qrcode": "^1.5.4",