Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
40a86a9
Add buy now component
yurynix May 26, 2025
728a4b8
Try to integrate
yurynix May 26, 2025
99df155
Wroking buy now
yurynix May 26, 2025
996fe5d
Cleanup
yurynix May 27, 2025
e7e52b0
Sprinkle tests
yurynix May 27, 2025
e35bb47
Add jsdoc
yurynix May 27, 2025
3aac14e
Adjust build
yurynix May 27, 2025
2465fdc
Headless hacks
yurynix May 28, 2025
02019a6
no no no
yurynix May 28, 2025
0e653f7
Sprinkle some promises
yurynix May 29, 2025
4466bbe
Cleanup
yurynix May 29, 2025
b8fd1d5
Proper name to integration
yurynix May 29, 2025
f312fd4
implement
nitayneeman May 29, 2025
d8de9e8
implement
nitayneeman May 29, 2025
846f22f
implement
nitayneeman May 29, 2025
4f215bf
implement
nitayneeman May 29, 2025
d20c43f
implement
nitayneeman May 29, 2025
546446c
implement
nitayneeman May 29, 2025
0b7e8bf
implement
nitayneeman May 29, 2025
ad1dfb5
implement
nitayneeman Jun 3, 2025
0e84cc8
implement app
nitayneeman Jun 3, 2025
8d6eba6
implement app
nitayneeman Jun 3, 2025
fd886d3
implement app
nitayneeman Jun 3, 2025
31f30e8
implement app
nitayneeman Jun 3, 2025
e3db98d
implement app
nitayneeman Jun 3, 2025
cd489df
implement app
nitayneeman Jun 4, 2025
df216c1
implement app
nitayneeman Jun 4, 2025
d8e50a7
implement app
nitayneeman Jun 4, 2025
8acc9b7
implement app
nitayneeman Jun 4, 2025
7e62a22
implement app
nitayneeman Jun 4, 2025
16f9060
implement app
nitayneeman Jun 4, 2025
1efc389
implement app
nitayneeman Jun 4, 2025
a803ae9
implement app
nitayneeman Jun 4, 2025
3a7b870
implement app
nitayneeman Jun 4, 2025
462b224
implement app
nitayneeman Jun 4, 2025
b0de87e
implement app
nitayneeman Jun 4, 2025
d2e7055
implement app
nitayneeman Jun 4, 2025
a5c38e7
implement app
nitayneeman Jun 4, 2025
2582e49
implement app
nitayneeman Jun 4, 2025
37cd7cc
implement app
nitayneeman Jun 4, 2025
07927f7
implement app
nitayneeman Jun 4, 2025
0644b03
implement app
nitayneeman Jun 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion examples/astro-components-demo/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,20 @@ import { defineConfig } from "astro/config";

import react from "@astrojs/react";

const integration = {
name: "headless-components-integration",
hooks: {
"astro:config:setup": ({ addClientDirective }) => {
addClientDirective({
name: "context-provider",
entrypoint: "@wix/headless-components-core/directive"
});
},
},
};

// https://astro.build/config
export default defineConfig({
integrations: [react()],
integrations: [react(), integration],
adapter: wix(),
});
11 changes: 7 additions & 4 deletions examples/astro-components-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@
"deploy:prod": "wix edge deploy --prod --no-prod-confirm"
},
"dependencies": {
"@astrojs/react": "^4.2.1",
"@astrojs/react": "^4.3.0",
"@playwright/test": "^1.51.1",
"@types/react": "^19.1.5",
"@types/react-dom": "^19.1.5",
"@wix/astro": "workspace:*",
"@wix/headless-bookings": "workspace:*",
"@wix/headless-ecom": "workspace:*",
"@wix/headless-stores": "workspace:*",
"astro": "^5.5.4",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"@wix/services-manager-react": "^0.1.9",
"astro": "^5.8.0",
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"devDependencies": {
"@wix/cli-edge": "^1.1.74"
Expand Down
202 changes: 189 additions & 13 deletions examples/astro-components-demo/src/components/App.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,199 @@
.App {
text-align: center;
/* Reset/clean base styles */
body,
html,
.product-page-wixstudio {
background: #fff;
color: #222;
font-family: "Inter", Arial, sans-serif;
margin: 0;
padding: 0;
}

.App-logo {
height: 40vmin;
pointer-events: none;
.product-page-wixstudio {
max-width: 900px;
margin: 40px auto;
padding: 32px 16px;
background: #fff;
border-radius: 12px;
box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

.App-header {
background-color: #282c34;
min-height: 100vh;
.main-section {
display: flex;
gap: 48px;
align-items: flex-start;
}

.image-section {
flex: 1 1 340px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
.main-image {
width: 340px;
height: 340px;
object-fit: cover;
border-radius: 8px;
border: 1px solid #eee;
margin-bottom: 16px;
}

.thumbnails {
display: flex;
gap: 8px;
}

.thumb {
width: 56px;
height: 56px;
object-fit: cover;
border-radius: 4px;
border: 2px solid #eee;
cursor: pointer;
transition: border 0.2s;
}
.thumb.selected {
border: 2px solid #0070f3;
}

.details-section {
flex: 2 1 400px;
display: flex;
flex-direction: column;
gap: 18px;
}

.product-title {
font-size: 2.2rem;
font-weight: 700;
margin: 0 0 8px 0;
}
.sku {
color: #888;
font-size: 1rem;
margin-bottom: 8px;
}
.price {
font-size: 2rem;
color: #222;
font-weight: 600;
margin-bottom: 8px;
}
.ribbon {
display: inline-block;
background: #ffe066;
color: #b8860b;
font-weight: 600;
padding: 2px 12px;
border-radius: 12px;
font-size: 1rem;
margin-bottom: 8px;
}
.desc {
font-size: 1.1rem;
color: #444;
margin-bottom: 12px;
}
.options {
display: flex;
gap: 18px;
}
.option-group {
display: flex;
flex-direction: column;
font-size: 1rem;
}
.option-group label {
margin-bottom: 2px;
font-weight: 500;
}
.option-group select {
padding: 4px 8px;
border-radius: 4px;
border: 1px solid #ccc;
font-size: 1rem;
}
.quantity-row {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.qty-input {
width: 60px;
padding: 4px 8px;
font-size: 1rem;
border-radius: 4px;
border: 1px solid #ccc;
}
.actions-row {
display: flex;
gap: 12px;
margin-bottom: 8px;
}
.primary-btn {
background: #0070f3;
color: #fff;
border: none;
border-radius: 6px;
padding: 10px 22px;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
}
.primary-btn:disabled {
background: #ccc;
cursor: not-allowed;
}
.wishlist-btn,
.wishlisted-btn {
background: none;
border: 1px solid #eee;
border-radius: 6px;
padding: 10px 18px;
font-size: 1.1rem;
cursor: pointer;
color: #e60023;
font-weight: 600;
transition: background 0.2s, border 0.2s;
}
.wishlisted-btn {
background: #ffe6ea;
border: 1px solid #e60023;
}
.preorder {
color: #0070f3;
font-weight: 600;
margin-top: 6px;
}
.low-stock {
color: #e60023;
font-weight: 600;
margin-top: 6px;
}
.info-sections {
margin-top: 40px;
display: flex;
flex-direction: column;
gap: 28px;
}
.info-block {
background: #fafafa;
border-radius: 8px;
padding: 24px 20px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.info-block h2 {
margin: 0 0 10px 0;
font-size: 1.2rem;
color: #222;
font-weight: 700;
}
.info-block p {
margin: 0;
color: #444;
font-size: 1rem;
}
Loading