-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
151a13a
commit 50c2b70
Showing
8 changed files
with
88 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 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,26 @@ | ||
--- | ||
title: MazLoadingBar | ||
description: MazLoadingBar is a standalone component | ||
--- | ||
|
||
# {{ $frontmatter.title }} | ||
|
||
{{ $frontmatter.description }} | ||
|
||
<!--@include: ./../.vitepress/mixins/getting-started.md--> | ||
|
||
## Basic usage | ||
|
||
<MazLoadingBar color="secondary" /> | ||
|
||
```vue | ||
<template> | ||
<MazLoadingBar color="secondary" /> | ||
</template> | ||
<script lang="ts" setup> | ||
import MazLoadingBar from 'maz-ui/components/MazLoadingBar' | ||
</script> | ||
``` | ||
|
||
<!--@include: ./../.vitepress/generated-docs/maz-loading-bar.doc.md--> |
This file contains 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 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
7 changes: 7 additions & 0 deletions
7
packages/lib/tests/specs/components/__snapshots__/maz-loading-bar.spec.ts.snap
This file contains 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[`MazLoadingBar > renders correct HTML structure 1`] = ` | ||
"<div data-v-744a78bd="" class="m-loading-bar"> | ||
<div data-v-744a78bd=""></div> | ||
</div>" | ||
`; |
35 changes: 35 additions & 0 deletions
35
packages/lib/tests/specs/components/__snapshots__/maz-table.spec.ts.snap
This file contains 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,35 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`MazTable > should render the component 1`] = ` | ||
"<div data-v-ac035b54="" class="m-table"> | ||
<!--v-if--> | ||
<table data-v-ac035b54="" class=""> | ||
<!--v-if--> | ||
<thead data-v-ac035b54=""> | ||
<!-- | ||
@slot thead - content in thead element | ||
--> | ||
<maztablerow data-v-ac035b54="" no-hoverable=""> | ||
<!--v-if--> | ||
<!--v-if--> | ||
</maztablerow> | ||
</thead> | ||
<!--v-if--> | ||
<tbody data-v-ac035b54="" class=""> | ||
<maztablerow data-v-ac035b54=""> | ||
<maztablecell data-v-ac035b54="" colspan="0"> | ||
<!-- | ||
@slot no-results - replace no results | ||
--> | ||
<p data-v-ac035b54="" class="maz-text-center maz-text-muted"> | ||
<!-- | ||
@slot no-results-text - replace no results test only | ||
--> No results | ||
</p> | ||
</maztablecell> | ||
</maztablerow> | ||
</tbody> | ||
</table> | ||
<!--v-if--> | ||
</div>" | ||
`; |
This file contains 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
10 changes: 10 additions & 0 deletions
10
packages/lib/tests/specs/components/maz-loading-bar.spec.ts
This file contains 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,10 @@ | ||
import { mount } from '@vue/test-utils' | ||
import MazLoadingBar from '@components/MazLoadingBar.vue' | ||
|
||
describe('MazLoadingBar', () => { | ||
test('renders default color correctly', () => { | ||
const wrapper = mount(MazLoadingBar) | ||
expect(wrapper.vm.colorCSVariables.alpha).toBe('var(--maz-color-primary-alpha-20)') | ||
expect(wrapper.vm.colorCSVariables.main).toBe('var(--maz-color-primary)') | ||
}) | ||
}) |