-
Notifications
You must be signed in to change notification settings - Fork 7
Created BccSpinner #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Created BccSpinner #217
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @layer components { | ||
| .bcc-spinner { | ||
| @apply animate-spin; | ||
| } | ||
| } | ||
16 changes: 16 additions & 0 deletions
16
design-library/src/components/BccSpinner/BccSpinner.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { describe, it, expect } from "vitest"; | ||
|
|
||
| import { mount } from "@vue/test-utils"; | ||
| import BccSpinner from "./BccSpinner.vue"; | ||
|
|
||
| describe("BccSpinner", () => { | ||
| it("Matches the snaphot", () => { | ||
| const wrapper = mount(BccSpinner, {}); | ||
| expect(wrapper.html()).toMatchSnapshot(); | ||
| }); | ||
|
|
||
| it("contains SVG element", () => { | ||
| const wrapper = mount(BccSpinner); | ||
| expect(wrapper.html()).toContain("<svg"); | ||
| }); | ||
| }); |
22 changes: 22 additions & 0 deletions
22
design-library/src/components/BccSpinner/BccSpinner.stories.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import BccSpinner from "./BccSpinner.vue"; | ||
|
|
||
| import type { Meta, StoryFn } from "@storybook/vue3"; | ||
|
|
||
| export default { | ||
| title: "Components/BccSpinner", | ||
| component: BccSpinner, | ||
| argTypes: {}, | ||
| } as Meta<typeof BccSpinner>; | ||
|
|
||
| const Template: StoryFn<typeof BccSpinner> = (args) => ({ | ||
| components: { BccSpinner }, | ||
| setup() { | ||
| return { args }; | ||
| }, | ||
| template: ` | ||
| <BccSpinner v-bind="args" /> | ||
| `, | ||
| }); | ||
|
|
||
| export const Example = Template.bind({}); | ||
| Example.args = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| <script setup lang="ts"> | ||
| type Props = {}; | ||
|
|
||
| withDefaults(defineProps<Props>(), {}); | ||
| </script> | ||
| <template> | ||
| <svg | ||
| class="bcc-spinner" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="100" | ||
| height="100" | ||
| viewBox="0 0 100 100" | ||
| fill="none" | ||
| > | ||
| > | ||
| <path | ||
| d="M100 50C100 77.6142 77.6142 100 50 100C22.3858 100 0 77.6142 0 50C0 22.3858 22.3858 0 50 0C77.6142 0 100 22.3858 100 50ZM9.08144 50C9.08144 72.5987 27.4013 90.9186 50 90.9186C72.5987 90.9186 90.9186 72.5987 90.9186 50C90.9186 27.4013 72.5987 9.08144 50 9.08144C27.4013 9.08144 9.08144 27.4013 9.08144 50Z" | ||
| fill="#F6F9F9" | ||
| ></path> | ||
| <path | ||
| d="M93.9676 38.4501C96.393 37.813 97.8624 35.3208 97.0079 32.9631C95.2932 28.2319 92.871 23.7784 89.8167 19.7572C85.8452 14.5284 80.8826 10.133 75.2124 6.82206C69.5422 3.51112 63.2754 1.34943 56.7698 0.460415C51.7666 -0.223279 46.6976 -0.143977 41.7345 0.687907C39.2613 1.10246 37.813 3.60696 38.4501 6.03244C39.0873 8.45792 41.5694 9.8809 44.0505 9.51628C47.8511 8.95773 51.7191 8.93607 55.5402 9.45823C60.8642 10.1858 65.9928 11.9548 70.6331 14.6644C75.2735 17.374 79.3347 20.971 82.5849 25.2501C84.9175 28.3212 86.7997 31.7005 88.1811 35.285C89.083 37.625 91.5421 39.0873 93.9676 38.4501Z" | ||
| fill="#30715E" | ||
| /> | ||
| </svg> | ||
| </template> |
7 changes: 7 additions & 0 deletions
7
design-library/src/components/BccSpinner/__snapshots__/BccSpinner.spec.ts.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
|
||
| exports[`BccSpinner > Matches the snaphot 1`] = ` | ||
| "<svg class=\\"bcc-spinner\\" xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"100\\" height=\\"100\\" viewBox=\\"0 0 100 100\\" fill=\\"none\\"> > <path d=\\"M100 50C100 77.6142 77.6142 100 50 100C22.3858 100 0 77.6142 0 50C0 22.3858 22.3858 0 50 0C77.6142 0 100 22.3858 100 50ZM9.08144 50C9.08144 72.5987 27.4013 90.9186 50 90.9186C72.5987 90.9186 90.9186 72.5987 90.9186 50C90.9186 27.4013 72.5987 9.08144 50 9.08144C27.4013 9.08144 9.08144 27.4013 9.08144 50Z\\" fill=\\"#F6F9F9\\"></path> | ||
| <path d=\\"M93.9676 38.4501C96.393 37.813 97.8624 35.3208 97.0079 32.9631C95.2932 28.2319 92.871 23.7784 89.8167 19.7572C85.8452 14.5284 80.8826 10.133 75.2124 6.82206C69.5422 3.51112 63.2754 1.34943 56.7698 0.460415C51.7666 -0.223279 46.6976 -0.143977 41.7345 0.687907C39.2613 1.10246 37.813 3.60696 38.4501 6.03244C39.0873 8.45792 41.5694 9.8809 44.0505 9.51628C47.8511 8.95773 51.7191 8.93607 55.5402 9.45823C60.8642 10.1858 65.9928 11.9548 70.6331 14.6644C75.2735 17.374 79.3347 20.971 82.5849 25.2501C84.9175 28.3212 86.7997 31.7005 88.1811 35.285C89.083 37.625 91.5421 39.0873 93.9676 38.4501Z\\" fill=\\"#30715E\\"></path> | ||
| </svg>" | ||
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.