Skip to content

Commit

Permalink
fix: stackflow-spa example
Browse files Browse the repository at this point in the history
  • Loading branch information
malangcat committed Jan 8, 2025
1 parent 418e676 commit 955ca99
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examples/stackflow-spa/src/design-system/ui/action-button.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"use client";

import "@seed-design/stylesheet/progressCircle.css";
// TODO: we have to ensure load order between actionButton.css and progressCircle.css. should we bundle them together?
import "@seed-design/stylesheet/actionButton.css";

import { ActionButton as SeedActionButton } from "@seed-design/react";
import * as React from "react";
import { ProgressCircle } from "./progress-circle";

export interface ActionButtonProps extends SeedActionButton.RootProps {
prefixIcon?: React.ReactNode;
Expand Down Expand Up @@ -35,7 +34,11 @@ export const ActionButton = React.forwardRef<
) : (
<SeedActionButton.Icon svg={children} />
)}
{loading ? <SeedActionButton.ProgressCircle /> : null}
{loading ? (
<SeedActionButton.ProgressIndicator>
<ProgressCircle size="inherit" tone="inherit" />
</SeedActionButton.ProgressIndicator>
) : null}
</SeedActionButton.Root>
);
},
Expand Down
30 changes: 30 additions & 0 deletions examples/stackflow-spa/src/design-system/ui/progress-circle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"use client";

import "@seed-design/stylesheet/progressCircle.css";

import { ProgressCircle as SeedProgressCircle } from "@seed-design/react";
import * as React from "react";

export interface ProgressCircleProps extends SeedProgressCircle.RootProps {}

/**
* @see https://v3.seed-design.io/docs/react/components/progress-circle
*/
export const ProgressCircle = React.forwardRef<
SVGSVGElement,
ProgressCircleProps
>((props, ref) => {
return (
<SeedProgressCircle.Root ref={ref} {...props}>
<SeedProgressCircle.Track />
<SeedProgressCircle.Range />
</SeedProgressCircle.Root>
);
});

ProgressCircle.displayName = "ProgressCircle";

/**
* This file is generated snippet from the Seed Design.
* You can extend the functionality from this snippet if needed.
*/

0 comments on commit 955ca99

Please sign in to comment.