Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit fd2bf30

Browse files
fix: export all primitives and components (#55)
1 parent b973be6 commit fd2bf30

File tree

14 files changed

+50
-12
lines changed

14 files changed

+50
-12
lines changed

src/components/index.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export * from "./Badges";
2+
export * from "./EvaluationForm";
3+
export * from "./IconLabel";
4+
export * from "./RadioGroupList";
5+
export * from "./Toaster";
6+
export * from "./pool/components/PoolCard";
7+
export * from "./pool/components/PoolSummary";
8+
export * from "./project/components/ProjectBanner";
9+
export * from "./project/components/ProjectCard";
10+
export * from "./project/components/ProjectSummary";

src/components/pool/components/PoolCard/PoolCard.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ export function PoolCard(props: PoolCardProps) {
1111
return match(props)
1212
.with({ queryResult: P.not(P.nullish) }, ({ queryResult }) =>
1313
match(queryResult)
14-
.with({ status: "error", error: P.select() }, (error) => <ErrorCard error={error} />)
14+
.with({ status: "error", error: P.select() }, (error) => <PoolErrorCard error={error} />)
1515
.with({ status: "pending" }, () => <LoadingCard />)
1616
.with({ status: "success", data: P.select() }, (data) => (
17-
<DataCard data={data} redirectProps={props} />
17+
<PoolDataCard data={data} redirectProps={props} />
1818
))
19-
.otherwise(() => <ErrorCard />),
19+
.otherwise(() => <PoolErrorCard />),
2020
)
21-
.otherwise(() => <DataCard data={props as PoolCardDataProps} redirectProps={props} />);
21+
.otherwise(() => <PoolDataCard data={props as PoolCardDataProps} redirectProps={props} />);
2222
}
2323

2424
function LoadingCard() {
@@ -37,7 +37,7 @@ function LoadingCard() {
3737
);
3838
}
3939

40-
export function DataCard({
40+
export function PoolDataCard({
4141
data,
4242
redirectProps,
4343
}: {
@@ -70,6 +70,6 @@ export function DataCard({
7070
);
7171
}
7272

73-
export function ErrorCard({ error }: { error?: Error | null }) {
73+
export function PoolErrorCard({ error }: { error?: Error | null }) {
7474
return <>{error ? <div>Error: {error.message}</div> : <div>Unknown Error</div>}</>;
7575
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./PoolCard";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./PoolSummary";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./ProjectBanner";

src/components/project/components/ProjectCard/ProjectCard.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ export function ProjectCard(props: ProjectCardProps) {
1111
return match(props)
1212
.with({ queryResult: P.not(P.nullish) }, ({ queryResult }) =>
1313
match(queryResult)
14-
.with({ status: "error", error: P.select() }, (error) => <ErrorCard error={error} />)
14+
.with({ status: "error", error: P.select() }, (error) => <ProjectErrorCard error={error} />)
1515
.with({ status: "pending" }, () => <LoadingCard />)
16-
.with({ status: "success", data: P.select() }, (data) => <DataCard data={data} />)
17-
.otherwise(() => <ErrorCard />),
16+
.with({ status: "success", data: P.select() }, (data) => <ProjectDataCard data={data} />)
17+
.otherwise(() => <ProjectErrorCard />),
1818
)
19-
.otherwise(() => <DataCard data={props as ProjectCardDataProps} />);
19+
.otherwise(() => <ProjectDataCard data={props as ProjectCardDataProps} />);
2020
}
2121

22-
export function DataCard({ data }: { data: ProjectCardDataProps }) {
22+
export function ProjectDataCard({ data }: { data: ProjectCardDataProps }) {
2323
return (
2424
<Card className="block max-w-sm overflow-hidden">
2525
<div className="relative">
@@ -50,6 +50,6 @@ export function LoadingCard() {
5050
);
5151
}
5252

53-
export function ErrorCard({ error }: { error?: Error }) {
53+
export function ProjectErrorCard({ error }: { error?: Error }) {
5454
return <></>;
5555
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./ProjectCard";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./ProjectSummary";

src/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import "./index.css";
22

3+
export * from "./primitives";
4+
export * from "./components";
35
export * from "./features/checker";
46
export { handlers } from "./mocks/handlers";

src/primitives/Badge/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./Badge";

src/primitives/Markdown/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./Markdown";

src/primitives/Navbar/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./Navbar";

src/primitives/Toast/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./Toast";

src/primitives/index.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export * from "./Accordion";
2+
export * from "./Avatar";
3+
export * from "./Badge";
4+
export * from "./BannerImage";
5+
export * from "./Breadcrumb";
6+
export * from "./Button";
7+
export * from "./Icon";
8+
export * from "./Indicators";
9+
export * from "./ListGrid";
10+
export * from "./Markdown";
11+
export * from "./Modal";
12+
export * from "./Navbar";
13+
export * from "./RadioGroup";
14+
export * from "./StatCard";
15+
export * from "./StatCardGroup";
16+
export * from "./TextArea";
17+
export * from "./Toast";

0 commit comments

Comments
 (0)