Skip to content

Commit c11199d

Browse files
committed
docs
1 parent a233b1c commit c11199d

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<script setup lang="ts">
2+
import {ref} from 'vue';
3+
4+
const tabs = [
5+
{label: 'npm', code: 'npm install -g @salesforce/b2c-cli'},
6+
{label: 'npx', code: 'npx @salesforce/b2c-cli --help'},
7+
{label: 'Homebrew', code: 'brew install SalesforceCommerceCloud/tools/b2c-cli'},
8+
];
9+
10+
const active = ref(0);
11+
</script>
12+
13+
<template>
14+
<section class="quick-install">
15+
<div class="container">
16+
<h2>Quick Install</h2>
17+
<p>Get started with the CLI in seconds:</p>
18+
<div class="tabs">
19+
<div class="tab-bar">
20+
<button
21+
v-for="(tab, i) in tabs"
22+
:key="tab.label"
23+
:class="['tab-btn', {active: active === i}]"
24+
@click="active = i"
25+
>
26+
{{ tab.label }}
27+
</button>
28+
</div>
29+
<div class="tab-panel">
30+
<code>{{ tabs[active].code }}</code>
31+
</div>
32+
</div>
33+
</div>
34+
</section>
35+
</template>
36+
37+
<style scoped>
38+
.quick-install {
39+
max-width: 768px;
40+
margin: 0 auto;
41+
padding: 0 24px 24px;
42+
text-align: center;
43+
}
44+
45+
.quick-install h2 {
46+
font-size: 1.4rem;
47+
font-weight: 600;
48+
margin-bottom: 4px;
49+
}
50+
51+
.quick-install p {
52+
color: var(--vp-c-text-2);
53+
margin-bottom: 12px;
54+
}
55+
56+
.tabs {
57+
border: 1px solid var(--vp-c-divider);
58+
border-radius: 8px;
59+
overflow: hidden;
60+
text-align: left;
61+
}
62+
63+
.tab-bar {
64+
display: flex;
65+
background: var(--vp-c-bg-soft);
66+
border-bottom: 1px solid var(--vp-c-divider);
67+
}
68+
69+
.tab-btn {
70+
padding: 6px 16px;
71+
font-size: 13px;
72+
font-weight: 500;
73+
color: var(--vp-c-text-2);
74+
background: transparent;
75+
border: none;
76+
cursor: pointer;
77+
border-bottom: 2px solid transparent;
78+
margin-bottom: -1px;
79+
}
80+
81+
.tab-btn.active {
82+
color: var(--vp-c-brand-1);
83+
border-bottom-color: var(--vp-c-brand-1);
84+
}
85+
86+
.tab-panel {
87+
padding: 16px 20px;
88+
background: var(--vp-code-block-bg);
89+
}
90+
91+
.tab-panel code {
92+
font-family: var(--vp-font-family-mono);
93+
font-size: 14px;
94+
color: var(--vp-c-text-1);
95+
}
96+
</style>

0 commit comments

Comments
 (0)