chore: Sync package version v1.15.3
This commit is contained in:
2
.vscode/image-link.code-snippets
vendored
2
.vscode/image-link.code-snippets
vendored
@@ -2,7 +2,7 @@
|
|||||||
"DocuImage": {
|
"DocuImage": {
|
||||||
"prefix": "image",
|
"prefix": "image",
|
||||||
"body": [
|
"body": [
|
||||||
""
|
""
|
||||||
],
|
],
|
||||||
"description": "Snippet untuk menampilkan image komponen."
|
"description": "Snippet untuk menampilkan image komponen."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,29 +2,32 @@
|
|||||||
|
|
||||||
import { ReactNode, useState } from 'react';
|
import { ReactNode, useState } from 'react';
|
||||||
import { ChevronRight } from 'lucide-react';
|
import { ChevronRight } from 'lucide-react';
|
||||||
|
import * as Icons from "lucide-react";
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
type AccordionProps = {
|
type AccordionProps = {
|
||||||
title: string;
|
title: string;
|
||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
defaultOpen?: boolean;
|
defaultOpen?: boolean;
|
||||||
className?: string;
|
icon?: keyof typeof Icons;
|
||||||
};
|
};
|
||||||
|
|
||||||
const Accordion = ({
|
const Accordion: React.FC<AccordionProps> = ({
|
||||||
title,
|
title,
|
||||||
children,
|
children,
|
||||||
defaultOpen = false,
|
defaultOpen = false,
|
||||||
className,
|
icon,
|
||||||
}: AccordionProps) => {
|
}: AccordionProps) => {
|
||||||
const [isOpen, setIsOpen] = useState(defaultOpen);
|
const [isOpen, setIsOpen] = useState(defaultOpen);
|
||||||
|
|
||||||
|
const Icon = icon ? (Icons[icon] as React.FC<{ className?: string }>) : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn("border rounded-lg overflow-hidden", className)}>
|
<div className={cn("border rounded-lg overflow-hidden")}>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setIsOpen(!isOpen)}
|
onClick={() => setIsOpen(!isOpen)}
|
||||||
className="flex items-center my-auto space-x-2 space-y-2 w-full px-4 h-12 transition-colors bg-background dark:hover:bg-muted/50 hover:bg-muted/15"
|
className="flex items-center space-x-2 w-full px-4 h-12 transition-colors bg-background dark:hover:bg-muted/50 hover:bg-muted/15"
|
||||||
>
|
>
|
||||||
<ChevronRight
|
<ChevronRight
|
||||||
className={cn(
|
className={cn(
|
||||||
@@ -32,7 +35,8 @@ const Accordion = ({
|
|||||||
isOpen && "rotate-90"
|
isOpen && "rotate-90"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<h3 className="font-medium text-base text-foreground pb-2">{title}</h3>
|
{Icon && <Icon className="text-foreground w-4 h-4"/> }
|
||||||
|
<h3 className="font-medium text-base text-foreground m-0">{title}</h3>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{isOpen && (
|
{isOpen && (
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ example note :
|
|||||||
displaying an image in markdown format :
|
displaying an image in markdown format :
|
||||||
|
|
||||||
```plaintext
|
```plaintext
|
||||||

|

|
||||||
```
|
```
|
||||||
|
|
||||||
render as :
|
render as :
|
||||||

|

|
||||||
|
|
||||||
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ example note :
|
|||||||
displaying an image in markdown format :
|
displaying an image in markdown format :
|
||||||
|
|
||||||
```plaintext
|
```plaintext
|
||||||

|

|
||||||
```
|
```
|
||||||
|
|
||||||
render as :
|
render as :
|
||||||

|

|
||||||
|
|
||||||
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ example note :
|
|||||||
displaying an image in markdown format :
|
displaying an image in markdown format :
|
||||||
|
|
||||||
```plaintext
|
```plaintext
|
||||||

|

|
||||||
```
|
```
|
||||||
|
|
||||||
render as :
|
render as :
|
||||||

|

|
||||||
|
|
||||||
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ example note :
|
|||||||
displaying an image in markdown format :
|
displaying an image in markdown format :
|
||||||
|
|
||||||
```plaintext
|
```plaintext
|
||||||

|

|
||||||
```
|
```
|
||||||
|
|
||||||
render as :
|
render as :
|
||||||

|

|
||||||
|
|
||||||
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ example note :
|
|||||||
displaying an image in markdown format :
|
displaying an image in markdown format :
|
||||||
|
|
||||||
```plaintext
|
```plaintext
|
||||||

|

|
||||||
```
|
```
|
||||||
|
|
||||||
render as :
|
render as :
|
||||||

|

|
||||||
|
|
||||||
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ example note :
|
|||||||
displaying an image in markdown format :
|
displaying an image in markdown format :
|
||||||
|
|
||||||
```plaintext
|
```plaintext
|
||||||

|

|
||||||
```
|
```
|
||||||
|
|
||||||
render as :
|
render as :
|
||||||

|

|
||||||
|
|
||||||
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
||||||
|
|
||||||
@@ -60,4 +60,15 @@ date : 10-12-2024
|
|||||||
image : example-img.png
|
image : example-img.png
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
</Note>
|
</Note>
|
||||||
|
|
||||||
|
<Accordion title="Code Block" defaultOpen={true} icon="Code">
|
||||||
|
```javascript:main.js showLineNumbers {3-4}
|
||||||
|
function isRocketAboutToCrash() {
|
||||||
|
// Check if the rocket is stable
|
||||||
|
if (!isStable()) {
|
||||||
|
NoCrash(); // Prevent the crash
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
</Accordion>
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ example note :
|
|||||||
displaying an image in markdown format :
|
displaying an image in markdown format :
|
||||||
|
|
||||||
```plaintext
|
```plaintext
|
||||||

|

|
||||||
```
|
```
|
||||||
|
|
||||||
render as :
|
render as :
|
||||||

|

|
||||||
|
|
||||||
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
||||||
|
|
||||||
|
|||||||
13
docu.json
13
docu.json
@@ -70,14 +70,7 @@
|
|||||||
"items": [
|
"items": [
|
||||||
{ "title": "Introduction", "href": "/introduction" },
|
{ "title": "Introduction", "href": "/introduction" },
|
||||||
{ "title": "Quick Start Guide", "href": "/quick-start-guide" },
|
{ "title": "Quick Start Guide", "href": "/quick-start-guide" },
|
||||||
{ "title": "Development", "href": "/development" },
|
{ "title": "Development", "href": "/development" }
|
||||||
{
|
|
||||||
"title": "Config",
|
|
||||||
"href": "/config",
|
|
||||||
"items": [
|
|
||||||
{ "title": "Sub Config", "href": "/subconfig" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -98,10 +91,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Changelog",
|
"title": "Changelog",
|
||||||
"href": "/Changelog",
|
"href": "/changelog",
|
||||||
"noLink": true,
|
"noLink": true,
|
||||||
"context": {
|
"context": {
|
||||||
"icon": "Hystory",
|
"icon": "History",
|
||||||
"description": "Update and Changes",
|
"description": "Update and Changes",
|
||||||
"title": "Release"
|
"title": "Release"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "docubook",
|
"name": "docubook",
|
||||||
"version": "1.15.2",
|
"version": "1.15.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user