Skip to content

Commit

Permalink
feat(progressSpinner): add progress spinner component
Browse files Browse the repository at this point in the history
RISDEV-4815
  • Loading branch information
hamo225 authored and andreasphil committed Sep 11, 2024
1 parent f99a432 commit 783642e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/primevue/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import "./global.css";

import button from "./button/button";
import fileUpload from "./fileUpload/fileUpload";
import inputGroup from "./inputGroup/inputGroup";
import inputGroupAddon from "./inputGroup/inputGroupAddon";
import inputText from "./inputText/inputText";
import password from "./password/password";
import fileUpload from "./fileUpload/fileUpload";
import progressSpinner from "./progressSpinner/progressSpinner";

export const RisUiTheme = {
button,
Expand All @@ -14,4 +15,5 @@ export const RisUiTheme = {
inputGroupAddon,
password,
fileUpload,
progressSpinner,
};
22 changes: 22 additions & 0 deletions src/primevue/progressSpinner/progressSpinner.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Meta, StoryObj } from "@storybook/vue3";
import ProgressSpinner from "primevue/progressspinner";
import { html } from "@/lib/tags.ts";

const meta: Meta<typeof ProgressSpinner> = {
component: ProgressSpinner,

tags: ["autodocs"],
};

export default meta;
type Story = StoryObj<typeof meta>;

export const Default: Story = {
render: (args) => ({
components: { ProgressSpinner },
setup() {
return { args };
},
template: html`<ProgressSpinner />`,
}),
};
14 changes: 14 additions & 0 deletions src/primevue/progressSpinner/progressSpinner.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { ProgressSpinnerPassThroughOptions } from "primevue/progressspinner";
import { tw } from "@/lib/tags.ts";

const progressSpinner: ProgressSpinnerPassThroughOptions = {
root: {
class: tw`relative mx-auto inline-block h-28 w-28 animate-spin`,
},

circle: {
class: tw`fill-transparent stroke-current stroke-[4px] text-blue-800 [stroke-dasharray:200] [stroke-dashoffset:100]`,
},
};

export default progressSpinner;

0 comments on commit 783642e

Please sign in to comment.