diff --git a/scripts/make-dist.mjs b/scripts/make-dist.mjs index ab492c1..780b1fe 100644 --- a/scripts/make-dist.mjs +++ b/scripts/make-dist.mjs @@ -21,6 +21,7 @@ export { default as Link } from "../src/components/Link.astro"; export { default as Modal } from "../src/components/Modal.astro"; export { default as MultiSelect } from "../src/components/MultiSelect.astro"; export { default as OtpField } from "../src/components/OtpField.astro"; +export { default as Panel } from "../src/components/Panel.astro"; export { default as PasswordField } from "../src/components/PasswordField.astro"; export { default as ThemeSwitcher } from "../src/components/ThemeSwitcher.astro"; export { default as TimePicker } from "../src/components/TimePicker.astro"; @@ -45,6 +46,7 @@ export const Link: any; export const Modal: any; export const MultiSelect: any; export const OtpField: any; +export const Panel: any; export const PasswordField: any; export const ThemeSwitcher: any; export const TimePicker: any; diff --git a/src/components/Panel.astro b/src/components/Panel.astro new file mode 100644 index 0000000..b6fa7e5 --- /dev/null +++ b/src/components/Panel.astro @@ -0,0 +1,131 @@ +--- +import type { HTMLAttributes } from "astro/types"; + +interface Props extends HTMLAttributes<"div"> { + id: string; + wrapperId: string; + isOpen?: boolean; + width?: number; + position?: "left" | "right"; + class?: string; +} + +const { + id, + wrapperId, + isOpen = false, + width = 360, + position = "right", + class: className, +}: Props = Astro.props; +--- + +
+ +
+ + + + diff --git a/src/index.ts b/src/index.ts index 7ffa4cd..532bc79 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,6 +13,7 @@ export { default as Link } from "./components/Link.astro"; export { default as Modal } from "./components/Modal.astro"; export { default as MultiSelect } from "./components/MultiSelect.astro"; export { default as OtpField } from "./components/OtpField.astro"; +export { default as Panel } from "./components/Panel.astro"; export { default as PasswordField } from "./components/PasswordField.astro"; export { default as ThemeSwitcher } from "./components/ThemeSwitcher.astro"; export { default as TimePicker } from "./components/TimePicker.astro"; diff --git a/src/layouts/ComponentLayout.astro b/src/layouts/ComponentLayout.astro index 1dac583..539a319 100644 --- a/src/layouts/ComponentLayout.astro +++ b/src/layouts/ComponentLayout.astro @@ -71,6 +71,9 @@ import Base from "./Base.astro";
  • Dashboard
  • +
  • + Panel +
  • diff --git a/src/pages/panel.astro b/src/pages/panel.astro new file mode 100644 index 0000000..ea15cc0 --- /dev/null +++ b/src/pages/panel.astro @@ -0,0 +1,38 @@ +--- +import ComponentLayout from "../layouts/ComponentLayout.astro"; +import Panel from "../components/Panel.astro"; +--- + + +
    +
    + + +
    +

    Data 1

    +

    Data 2

    +

    Data 3

    +

    Data 4

    +
    +
    + + +

    Settings Panel

    +

    This is a settings panel with a width of 400px.

    +
    +
    +
    + +