diff --git a/index.ts b/index.ts index 3c74ba6..c63f2f7 100644 --- a/index.ts +++ b/index.ts @@ -1,2 +1,2 @@ -// export { default as Card } from "./src/Card.astro" -// export { default as Header } from "./src/Header.astro" \ No newline at end of file +export { default as Dialog } from "./src/Dialog.astro" +export { default as VideoItem } from "./src/VideoItem.astro" \ No newline at end of file diff --git a/src/Dialog.astro b/src/Dialog.astro new file mode 100644 index 0000000..3481145 --- /dev/null +++ b/src/Dialog.astro @@ -0,0 +1,40 @@ +--- +// Properties +const { + Name, + Title = 'Dialog Title', + Description = 'Description', + CloseButton = true, + QuestionTooltip = false, // Requires Astro Tooltip: https://code.juliancataldo.com/component/astro-tooltips/#installation + Actions = false, + BlurryBackdrop = true +} = Astro.props +--- + +
+
+
+
+

{Title}

+

{Description}

+
+
+ {QuestionTooltip ? + + : + null + } + {CloseButton ? : null} +
+
+
+ +
+ {Actions ? +
+ +
+ : + null + } +
\ No newline at end of file diff --git a/src/VideoItem.astro b/src/VideoItem.astro new file mode 100644 index 0000000..1ed229e --- /dev/null +++ b/src/VideoItem.astro @@ -0,0 +1,31 @@ +--- +// Properties +const { + VideoId, + CreatorId, + Title, + Thumbnail, + Date, + Views, + Length, + Platform +} = Astro.props + +// Components +import { Image } from 'astro:assets'; +--- + + +
+ {'Thumbnail'} +

{Platform}

+

{Length}

+
+
+ {'Creator +
+

{Title}

+

{Date} - {Views}

+
+
+
\ No newline at end of file diff --git a/test/astro.config.mjs b/test/astro.config.mjs new file mode 100644 index 0000000..882e651 --- /dev/null +++ b/test/astro.config.mjs @@ -0,0 +1,4 @@ +import { defineConfig } from 'astro/config'; + +// https://astro.build/config +export default defineConfig({}); diff --git a/test/package.json b/test/package.json new file mode 100644 index 0000000..29870af --- /dev/null +++ b/test/package.json @@ -0,0 +1,17 @@ +{ + "name": "test", + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro check && astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "astro": "^4.14.2", + "@astrojs/check": "^0.9.2", + "typescript": "^5.5.4" + } +} \ No newline at end of file diff --git a/test/src/env.d.ts b/test/src/env.d.ts new file mode 100644 index 0000000..e16c13c --- /dev/null +++ b/test/src/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/test/src/pages/index.astro b/test/src/pages/index.astro new file mode 100644 index 0000000..2d14107 --- /dev/null +++ b/test/src/pages/index.astro @@ -0,0 +1,16 @@ +--- + +--- + + + + + + + + Astro + + +

Astro

+ + diff --git a/test/tsconfig.json b/test/tsconfig.json new file mode 100644 index 0000000..77da9dd --- /dev/null +++ b/test/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "astro/tsconfigs/strict" +} \ No newline at end of file