Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
},
"dependencies": {
"@probat/react": "^0.4.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
46 changes: 41 additions & 5 deletions src/components/GetStartedButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Experiment } from '@probat/react';
import React from 'react'

interface GetStartedButtonProps {
Expand All @@ -6,11 +7,46 @@ interface GetStartedButtonProps {
}

const GetStartedButton: React.FC<GetStartedButtonProps> = ({ label = 'Get Started Free', large = false }) => {
return (
<button className={`btn btn-primary${large ? ' btn-large' : ''}`}>
{label}
</button>
)
const handleClick = () => {
// Track button click for experiment analytics
console.log('GetStartedButton clicked - V2 Icon-Enhanced CTA');
}

return (
<Experiment
id="exp_GetStartedButton_20260307_e8f4a2b1"
control={
<button className={`btn btn-primary${large ? ' btn-large' : ''}`}>
{label}
</button>
}
variants={{
V2: (
<button className={`btn btn-primary${large ? ' btn-large' : ''}`} onClick={handleClick}>
<span style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}>
{label}
<svg
className="btn-icon"
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3 8H13M13 8L9 4M13 8L9 12"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
</span>
</button>
),
}}
/>
);
}

export default GetStartedButton
12 changes: 10 additions & 2 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ body {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 12px 24px;
padding: 12px 28px;
border: none;
border-radius: 8px;
font-size: 16px;
Expand All @@ -53,6 +53,14 @@ body {
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover .btn-icon {
transform: translateX(4px);
}

.btn-icon {
transition: transform 0.3s ease;
}

.btn-outline {
background: transparent;
color: #667eea;
Expand All @@ -66,7 +74,7 @@ body {
}

.btn-large {
padding: 16px 32px;
padding: 16px 28px;
font-size: 18px;
}

Expand Down