Skip to content

Commit 7740aa3

Browse files
chore: wip
1 parent 67cad46 commit 7740aa3

File tree

16 files changed

+1140
-0
lines changed

16 files changed

+1140
-0
lines changed

bun.lockb

1.8 KB
Binary file not shown.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* eslint-disable */
2+
// @ts-nocheck
3+
// Generated by unplugin-vue-components
4+
// Read more: https://github.com/vuejs/core/pull/3399
5+
export {}
6+
7+
/* prettier-ignore */
8+
declare module 'vue' {
9+
export interface GlobalComponents {
10+
11+
}
12+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/assest/stacks.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Stacks</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "@stacksjs/payment",
3+
"type": "module",
4+
"version": "0.10.0",
5+
"description": "An opinionated notification component for Stacks.",
6+
"author": "Chris Breuer",
7+
"contributors": ["Chris Breuer <chris@stacksjs.org>"],
8+
"license": "MIT",
9+
"funding": "https://github.com/sponsors/chrisbbreuer",
10+
"homepage": "https://github.com/stacksjs/stacks/tree/main/storage/framework/core/components/notification#readme",
11+
"repository": {
12+
"type": "git",
13+
"url": "git+https://github.com/stacksjs/stacks.git",
14+
"directory": "./storage/framework/core/components/notification"
15+
},
16+
"sideEffects": ["**/*.css"],
17+
"exports": {
18+
".": {
19+
"types": "./dist/index.d.ts",
20+
"import": "./dist/index.js"
21+
},
22+
"./*": {
23+
"import": "./src/*"
24+
}
25+
},
26+
"module": "dist/index.js",
27+
"types": "dist/index.d.ts",
28+
"files": ["README.md", "dist", "src"],
29+
"scripts": {
30+
"dev": "bunx --bun vite -c ./vite.config.ts",
31+
"build": "bunx --bun vite build --mode lib",
32+
"build:demo": "bunx --bun vite build",
33+
"build:types": "bunx --bun vue-tsc -p tsconfig.build.json && api-extractor run",
34+
"preview": "bunx --bun vite preview"
35+
},
36+
"dependencies": {
37+
"@stacksjs/ui": "workspace:*",
38+
"highlight.js": "^11.10.0",
39+
"vue": "^3.5.11"
40+
},
41+
"devDependencies": {
42+
"@microsoft/api-extractor": "^7.47.9",
43+
"@stacksjs/alias": "workspace:*",
44+
"@stacksjs/development": "workspace:*",
45+
"@types/clean-css": "^4.2.11",
46+
"@vue/tsconfig": "^0.5.1",
47+
"clean-css": "^5.3.3",
48+
"unplugin-icons": "^0.19.3"
49+
}
50+
}
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<script lang="ts" setup>
2+
3+
4+
</script>
5+
6+
<template>
7+
<div class="bg-neutral-100/66 px-4 dark:bg-neutral-900">
8+
<Checkout />
9+
</div>
10+
</template>
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<script>
2+
import { StripeCheckout } from '@vue-stripe/vue-stripe'
3+
4+
export default {
5+
components: {
6+
StripeCheckout,
7+
},
8+
data() {
9+
this.publishableKey = 'abcd'
10+
return {
11+
loading: false,
12+
lineItems: [
13+
{
14+
price: 'abcd', // The id of the one-time price you created in your Stripe dashboard
15+
quantity: 1,
16+
},
17+
],
18+
successURL: 'your-success-url',
19+
cancelURL: 'your-cancel-url',
20+
}
21+
},
22+
methods: {
23+
submit() {
24+
// You will be redirected to Stripe's secure checkout page
25+
this.$refs.checkoutRef.redirectToCheckout()
26+
},
27+
},
28+
}
29+
</script>
30+
31+
<template>
32+
<div>
33+
<StripeCheckout
34+
ref="checkoutRef"
35+
mode="payment"
36+
:pk="publishableKey"
37+
:line-items="lineItems"
38+
:success-url="successURL"
39+
:cancel-url="cancelURL"
40+
@loading="v => loading = v"
41+
/>
42+
<button @click="submit">
43+
Pay now!
44+
</button>
45+
</div>
46+
</template>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { createHead } from '@vueuse/head'
2+
import { createApp } from 'vue'
3+
import App from './App.vue'
4+
import '@unocss/reset/tailwind.css'
5+
import 'uno.css'
6+
7+
const app = createApp(App)
8+
const head = createHead()
9+
10+
app.use(head)
11+
app.mount('#app')

0 commit comments

Comments
 (0)