Skip to content

Commit 644c106

Browse files
chore: update TypeScript types for consistency and improve peer dependency versions
1 parent 0f3c96c commit 644c106

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"typescript": "^5.9.3"
4646
},
4747
"peerDependencies": {
48-
"react": "^19.2.4",
49-
"react-dom": "^19.2.4"
48+
"react": ">=18",
49+
"react-dom": ">=18"
5050
}
5151
}

src/types/index.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import React from "react";
1+
import type { ReactNode } from "react";
22

33
/* =========================
4-
THEME
4+
Theme
55
========================= */
66

7-
export type theme = "AOSSIE" | "light" | "dark" | "minimal" | "corporate";
7+
export type Theme = "AOSSIE" | "light" | "dark" | "minimal" | "corporate";
88

99
/* =========================================================
1010
Button Variant
@@ -16,18 +16,18 @@ export type ButtonVariant = "solid" | "outline" | "ghost" | "gradient";
1616
IMAGE TYPE
1717
========================= */
1818

19-
export type image = {
19+
export type Image = {
2020
src?: string;
2121
alt?: string;
2222
};
2323

2424
/* =========================
25-
HERO SECTION
25+
Hero SECTION
2626
========================= */
2727

28-
export type hero = {
29-
/** Optional hero background image */
30-
image?: image;
28+
export type Hero = {
29+
/** Optional Hero background Image */
30+
Image?: Image;
3131

3232
title: string;
3333
description: string;
@@ -54,7 +54,7 @@ export type organizationInformation = {
5454
description: string;
5555

5656
/** Organization logo */
57-
logo?: image | string;
57+
logo?: Image | string;
5858

5959
projectInformation: projectInformation;
6060
};
@@ -95,7 +95,7 @@ export type sponsors = sponsor[];
9595
export type sponsorLink = {
9696
name: string;
9797
url: string;
98-
icon?: React.ReactNode;
98+
icon?: ReactNode;
9999
className?: string;
100100

101101
/** open link in new tab */
@@ -106,7 +106,7 @@ export type sponsorLink = {
106106
CTA SECTION
107107
========================= */
108108

109-
export type CTAsection = {
109+
export type CTASection = {
110110
title: string;
111111
description: string;
112112
sponsorLink: sponsorLink[];
@@ -116,21 +116,21 @@ export type CTAsection = {
116116
BACKGROUND PATTERNS
117117
========================= */
118118

119-
export type pattern = "dots" | "grid" | "stripes" | "none";
119+
export type Pattern = "dots" | "grid" | "stripes" | "none";
120120

121121
/* =========================
122122
SUPPORT US COMPO PROPS
123123
========================= */
124124

125125
export interface supportUsButtonProps {
126126
// Theme for the button, can be one of "AOSSIE", "light", "dark", "minimal", or "corporate"
127-
theme?: theme;
127+
Theme?: Theme;
128128

129129
// Optional background pattern for the button, can be one of "dots", "grid", "stripes", or "none"
130-
pattern?: pattern;
130+
pattern?: Pattern;
131131

132-
// Information about the hero section, including title, description, sponsor label, and optional background image
133-
Hero: hero;
132+
// Information about the Hero section, including title, description, sponsor label, and optional background Image
133+
hero: Hero;
134134

135135
// Information about the organization, including name, description, logo, and project information
136136
organizationInformation: organizationInformation;
@@ -139,17 +139,17 @@ export interface supportUsButtonProps {
139139
sponsors: sponsors;
140140

141141
// Information about the call-to-action section, including title, description, and sponsor links
142-
CTAsection: CTAsection;
142+
ctaSection: CTASection;
143143

144144
// Optional class name for custom styling
145145
classNames?: {
146146
container?: string;
147-
hero?: string;
147+
Hero?: string;
148148
organizationInformation?: string;
149149
sponsors?: string;
150-
CTAsection?: string;
150+
ctaSection?: string;
151151
};
152152

153153
// Optional button variant for styling the call-to-action buttons
154-
ButtonVariant?: ButtonVariant;
154+
buttonVariant?: ButtonVariant;
155155
}

0 commit comments

Comments
 (0)