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; +--- + +
This is a settings panel with a width of 400px.
+