fansunited-sports-ui 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CONTENT_CARD.md +6 -14
- package/dist/CTA_BUTTON.md +10 -24
- package/dist/CTA_GROUP.md +6 -12
- package/dist/PROFILE_HEADER.md +5 -5
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -9
- package/dist/index.es.js +7 -7
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/CONTENT_CARD.md
CHANGED
|
@@ -806,8 +806,8 @@ interface CTAGroupProps {
|
|
|
806
806
|
|
|
807
807
|
```tsx
|
|
808
808
|
<CTAGroup
|
|
809
|
-
primaryCta={<CTAButton
|
|
810
|
-
secondaryCta={<CTAButton
|
|
809
|
+
primaryCta={<CTAButton text="Learn More" href="/learn" />}
|
|
810
|
+
secondaryCta={<CTAButton text="Share" onClick={handleShare} />}
|
|
811
811
|
layout="responsive" // Vertical on mobile, horizontal on desktop
|
|
812
812
|
className="mt-4"
|
|
813
813
|
/>
|
|
@@ -886,18 +886,10 @@ interface CallToAction {
|
|
|
886
886
|
```tsx
|
|
887
887
|
import { CTAButton } from '@fansunited/tailwind-ui-components';
|
|
888
888
|
|
|
889
|
-
<CTAButton
|
|
890
|
-
text: "Learn More",
|
|
891
|
-
href: "/learn-more",
|
|
892
|
-
variant: "primary"
|
|
893
|
-
}} />
|
|
889
|
+
<CTAButton text="Learn More" href="/learn-more" variant="primary" />
|
|
894
890
|
|
|
895
891
|
// With custom onClick
|
|
896
|
-
<CTAButton
|
|
897
|
-
text: "Subscribe",
|
|
898
|
-
onClick: () => handleSubscribe(),
|
|
899
|
-
variant: "secondary"
|
|
900
|
-
}} />
|
|
892
|
+
<CTAButton text="Subscribe" onClick={() => handleSubscribe()} variant="secondary" />
|
|
901
893
|
```
|
|
902
894
|
|
|
903
895
|
**Variants:**
|
|
@@ -1441,8 +1433,8 @@ CTAs should be passed as separate `primaryCta` and `secondaryCta` props, not as
|
|
|
1441
1433
|
// Good - CTAs as props
|
|
1442
1434
|
<ContentCard
|
|
1443
1435
|
content={cardContent}
|
|
1444
|
-
primaryCta={<CTAButton
|
|
1445
|
-
secondaryCta={<CTAButton
|
|
1436
|
+
primaryCta={<CTAButton text="Learn More" href="/learn" />}
|
|
1437
|
+
secondaryCta={<CTAButton text="Share" onClick={handleShare} />}
|
|
1446
1438
|
/>;
|
|
1447
1439
|
|
|
1448
1440
|
// Avoid - CTAs in content (deprecated pattern)
|
package/dist/CTA_BUTTON.md
CHANGED
|
@@ -26,37 +26,23 @@ import type { CTAButtonProps, CallToAction } from "@fansunited/tailwind-ui-compo
|
|
|
26
26
|
### Primary Button
|
|
27
27
|
|
|
28
28
|
```tsx
|
|
29
|
-
<CTAButton
|
|
30
|
-
cta={{
|
|
31
|
-
text: "Get Started",
|
|
32
|
-
variant: "primary",
|
|
33
|
-
onClick: () => console.log("clicked"),
|
|
34
|
-
}}
|
|
35
|
-
/>
|
|
29
|
+
<CTAButton text="Get Started" variant="primary" onClick={() => console.log("clicked")} />
|
|
36
30
|
```
|
|
37
31
|
|
|
38
32
|
### Link Button
|
|
39
33
|
|
|
40
34
|
```tsx
|
|
41
|
-
<CTAButton
|
|
42
|
-
cta={{
|
|
43
|
-
text: "Learn More",
|
|
44
|
-
href: "/learn-more",
|
|
45
|
-
variant: "outline",
|
|
46
|
-
}}
|
|
47
|
-
/>
|
|
35
|
+
<CTAButton text="Learn More" href="/learn-more" variant="outline" />
|
|
48
36
|
```
|
|
49
37
|
|
|
50
38
|
### Custom Styled Button
|
|
51
39
|
|
|
52
40
|
```tsx
|
|
53
41
|
<CTAButton
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
onClick: handleCustomAction,
|
|
59
|
-
}}
|
|
42
|
+
text="Custom Action"
|
|
43
|
+
variant="custom"
|
|
44
|
+
styles={{ container: "bg-gradient-to-r from-purple-500 to-pink-500 text-white px-6 py-3" }}
|
|
45
|
+
onClick={handleCustomAction}
|
|
60
46
|
/>
|
|
61
47
|
```
|
|
62
48
|
|
|
@@ -105,8 +91,8 @@ import { ContentCard, CTAButton } from "@fansunited/tailwind-ui-components";
|
|
|
105
91
|
<ContentCard
|
|
106
92
|
content={cardContent}
|
|
107
93
|
variant="hero"
|
|
108
|
-
primaryCta={<CTAButton
|
|
109
|
-
secondaryCta={<CTAButton
|
|
94
|
+
primaryCta={<CTAButton text="Read More" href="/article" variant="primary" />}
|
|
95
|
+
secondaryCta={<CTAButton text="Watch Video" onClick={openVideo} variant="outline" />}
|
|
110
96
|
/>;
|
|
111
97
|
```
|
|
112
98
|
|
|
@@ -117,8 +103,8 @@ import { EntityHeader, CTAButton } from "@fansunited/tailwind-ui-components";
|
|
|
117
103
|
|
|
118
104
|
<EntityHeader
|
|
119
105
|
entity={{ name: "Arsenal", imageUrl: "..." }}
|
|
120
|
-
primaryCta={<CTAButton
|
|
121
|
-
secondaryCta={<CTAButton
|
|
106
|
+
primaryCta={<CTAButton text="Follow" variant="primary" />}
|
|
107
|
+
secondaryCta={<CTAButton text="Stats" variant="outline" />}
|
|
122
108
|
/>;
|
|
123
109
|
```
|
|
124
110
|
|
package/dist/CTA_GROUP.md
CHANGED
|
@@ -9,28 +9,22 @@ import { CTAGroup, CTAButton } from "@fansunited/tailwind-ui-components";
|
|
|
9
9
|
|
|
10
10
|
// Responsive layout (default)
|
|
11
11
|
<CTAGroup
|
|
12
|
-
primaryCta={<CTAButton
|
|
13
|
-
secondaryCta={<CTAButton
|
|
12
|
+
primaryCta={<CTAButton text="Primary" variant="primary" />}
|
|
13
|
+
secondaryCta={<CTAButton text="Secondary" variant="outline" />}
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
// Vertical layout
|
|
17
|
-
<CTAGroup
|
|
18
|
-
primaryCta={<CTAButton cta={{ text: "Subscribe", variant: "primary" }} />}
|
|
19
|
-
layout="vertical"
|
|
20
|
-
/>
|
|
17
|
+
<CTAGroup primaryCta={<CTAButton text="Subscribe" variant="primary" />} layout="vertical" />
|
|
21
18
|
|
|
22
19
|
// Horizontal layout
|
|
23
20
|
<CTAGroup
|
|
24
|
-
primaryCta={<CTAButton
|
|
25
|
-
secondaryCta={<CTAButton
|
|
21
|
+
primaryCta={<CTAButton text="Accept" variant="primary" />}
|
|
22
|
+
secondaryCta={<CTAButton text="Decline" variant="outline" />}
|
|
26
23
|
layout="horizontal"
|
|
27
24
|
/>
|
|
28
25
|
|
|
29
26
|
// With custom container styling
|
|
30
|
-
<CTAGroup
|
|
31
|
-
primaryCta={<CTAButton cta={{ text: "Submit", variant: "primary" }} />}
|
|
32
|
-
styles={{ container: "mt-4 gap-4" }}
|
|
33
|
-
/>
|
|
27
|
+
<CTAGroup primaryCta={<CTAButton text="Submit" variant="primary" />} styles={{ container: "mt-4 gap-4" }} />
|
|
34
28
|
```
|
|
35
29
|
|
|
36
30
|
## Props
|
package/dist/PROFILE_HEADER.md
CHANGED
|
@@ -16,8 +16,8 @@ import { ProfileHeader } from "fansunited-tailwind-ui-components";
|
|
|
16
16
|
subtitle: "Premier League",
|
|
17
17
|
styles: { imageShape: "square", imageSize: "lg" },
|
|
18
18
|
}}
|
|
19
|
-
primaryCta={<CTAButton
|
|
20
|
-
secondaryCta={<CTAButton
|
|
19
|
+
primaryCta={<CTAButton text="Follow" variant="primary" />}
|
|
20
|
+
secondaryCta={<CTAButton text="View Stats" variant="outline" />}
|
|
21
21
|
/>;
|
|
22
22
|
```
|
|
23
23
|
|
|
@@ -73,7 +73,7 @@ The `entity` prop accepts all `EntityDisplayProps`:
|
|
|
73
73
|
subtitle: "Premier League",
|
|
74
74
|
styles: { imageShape: "square", imageSize: "xl" },
|
|
75
75
|
}}
|
|
76
|
-
primaryCta={<CTAButton
|
|
76
|
+
primaryCta={<CTAButton text="Follow" variant="primary" />}
|
|
77
77
|
styles={{
|
|
78
78
|
background: "bg-gradient-to-r from-primary-600 to-primary-800",
|
|
79
79
|
padding: "6",
|
|
@@ -92,8 +92,8 @@ The `entity` prop accepts all `EntityDisplayProps`:
|
|
|
92
92
|
subtitle: "Forward • Portugal",
|
|
93
93
|
styles: { imageShape: "round", imageSize: "lg" },
|
|
94
94
|
}}
|
|
95
|
-
primaryCta={<CTAButton
|
|
96
|
-
secondaryCta={<CTAButton
|
|
95
|
+
primaryCta={<CTAButton text="Follow" variant="primary" />}
|
|
96
|
+
secondaryCta={<CTAButton text="View Stats" variant="outline" />}
|
|
97
97
|
ctaLayout="stacked"
|
|
98
98
|
/>
|
|
99
99
|
```
|