Skip to content

Commit

Permalink
🔧 chore(getting-started.md): update installation instructions and cod…
Browse files Browse the repository at this point in the history
…e examples

🔧 chore(index.md): update "Get Started" button text
🔧 chore(package.json): add postcss dependency
🔧 chore(postcss.config.mjs): add postcss configuration file
The installation instructions and code examples in the `getting-started.md` file have been updated to reflect the latest changes. The "Get Started" button text in the `index.md` file has been changed to "Let's Go!". The `package.json` file has been updated to include the `postcss` dependency. A new `postcss.config.mjs` file has been added to the project with the necessary configuration for postcss. These changes were made to improve the installation process and provide better code examples and configuration for the project.
  • Loading branch information
jofftiquez committed Jan 19, 2024
1 parent a90ebda commit 85bbea3
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 5 deletions.
57 changes: 56 additions & 1 deletion getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,59 @@

## Installation

### Requirements
### NPM

```bash
npm install @vue-stripe/vue-stripe
```

### Yarn

```bash
yarn add @vue-stripe/vue-stripe
```


### Composable Usage

```vue
<script setup>
import { onMounted, ref } from 'vue';
import { useStripe } from '@vue-stripe/vue-stripe';
const { initStripe } = useStripe();
const stripe = ref(null);
onMounted(async () => {
// Initialize Stripe.js
stripe.value = await initStripe('pk_...');
});
</script>
```

### Component Usage

```vue
<script setup>
import { VueStripe, Elements, PaymentIntent } from '@vue-stripe/vue-stripe';
const pk = 'pk_...';
</script>
<template>
<VueStripe
:pk="pk"
v-slot:default="{ stripe }"
>
<Elements
:stripe="stripe"
:client-secret="clientSecret"
v-slot:default="{ element }"
>
<PaymentIntent
:stripe="stripe"
:element="element"
/>
</Elements>
</VueStripe>
</template>
```
8 changes: 4 additions & 4 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ hero:
alt: Vue Stripe Logo
actions:
- theme: brand
text: Get Started
link: /getting-started
- theme: alt
text: Introduction
text: Let's Go!
link: /introduction
- theme: alt
text: View on GitHub
link: https://github.com/vue-stripe

features:
- icon: 💰
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"docs:preview": "vitepress preview"
},
"devDependencies": {
"postcss": "^8.4.33",
"vitepress": "^1.0.0-rc.39"
}
}
5 changes: 5 additions & 0 deletions postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { postcssIsolateStyles } from 'vitepress'

export default {
plugins: [postcssIsolateStyles()]
}

0 comments on commit 85bbea3

Please sign in to comment.