Skip to content

Commit

Permalink
fix: update placeholder snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Aug 29, 2024
1 parent a918c4a commit 32edd8c
Show file tree
Hide file tree
Showing 15 changed files with 142 additions and 129 deletions.
168 changes: 84 additions & 84 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/components/EmptyState/WEmptyState.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ describe('WEmptyState', () => {
it('renders properly', () => {
const wrapper = mount(WEmptyState, {
props: {
text: 'Empty state',
},
text: 'Empty state'
}
})

expect(wrapper.element).toMatchSnapshot()
})
})
})
2 changes: 1 addition & 1 deletion src/components/EmptyState/WEmptyState.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ export const Section: Story = {
template: `<WEmptyState v-bind="args" />`
}),
args: {
text: 'Empty state text',
text: 'Empty state text'
}
}
4 changes: 2 additions & 2 deletions src/components/EmptyState/WEmptyState.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import EmptyStateLogo from '@/assets/svg/empty-state.svg?component'
defineProps({
text: {
type: String,
required: true,
},
required: true
}
})
</script>
36 changes: 17 additions & 19 deletions src/components/Footer/WFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,23 @@
<WitOracleIcon class="w-[140px] h-auto white" name="witnet_dark" />
<div class="h-max self-center">
<p class="copyright max-w-100 footer-text">
© <span>2018-{{ new Date().getFullYear() }}</span
>
<slot name="custom-contributors">
<span>
by <a :href=WITNET_FOUNDATION_URL target="_blank">
Witnet Foundation
</a> and individual contributors.
</span>
</slot>
© <span>2018-{{ new Date().getFullYear() }}</span>
<slot name="custom-contributors">
<span>
by <a :href="WITNET_FOUNDATION_URL" target="_blank"> Witnet Foundation </a> and
individual contributors.
</span>
</slot>
</p>
<p class="copyright max-w-100 footer-text">
<slot name="custom-license">
<span>
Content available under a
<a :href="CREATIVE_COMMONS_URL" target="_blank"> Creative Commons License </a>
.
</span>
</slot>
</p>
<p class="copyright max-w-100 footer-text"><slot name="custom-license">
<span>
Content available under a
<a :href=CREATIVE_COMMONS_URL target="_blank">
Creative Commons License
</a>
.
</span>
</slot></p>
</div>
<!-- <client-only>
<LanguageSwitcher class="justify-self-end self-center" />
Expand Down Expand Up @@ -92,6 +90,6 @@ defineProps({
adoDescription: {
type: String,
default: `Witnet is part of the Alliance of Decentralized Oracles (ADO), a joint effort by leading decentralized oracle solutions to make the life of smart contract developers easier by creating oracle standards. Learn more about the ADO at`
},
}
})
</script>
6 changes: 3 additions & 3 deletions src/components/LoadingPlaceholder/WLoadingPlaceholder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ describe('WLoadingPlaceholder', () => {
props: {
height: '100px',
width: '150px',
borderRadius: '8%',
},
borderRadius: '8%'
}
})

expect(wrapper.element).toMatchSnapshot()
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ export const Section: Story = {
args: {
height: '100px',
width: '150px',
borderRadius: '8%',
borderRadius: '8%'
}
}
15 changes: 9 additions & 6 deletions src/components/LoadingPlaceholder/WLoadingPlaceholder.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
<template>
<div class="placeholder bg-gray-50 bg-opacity-60 bg-gradient-to-r from-gray-50 shadow-sm shadow-gray-100 bg-[length:200%_200%]">&nbsp;</div>
<div
class="placeholder bg-gray-50 bg-opacity-60 bg-gradient-to-r from-gray-50 shadow-sm shadow-gray-100 bg-[length:200%_200%]"
>
&nbsp;
</div>
<span class="sr-only">Loading...</span>
</template>
<script setup>
defineProps({
height: {
type: String,
required: true,
required: true
},
width: {
type: String,
required: true,
required: true
},
borderRadius: {
type: String,
required: true,
},
required: true
}
})
</script>
<style scoped lang="scss">
Expand All @@ -34,4 +38,3 @@ defineProps({
animation: bgAnimate 1.2s linear infinite;
}
</style>

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`WLoadingPlaceholder > renders properly 1`] = `
class="placeholder bg-gray-50 bg-opacity-60 bg-gradient-to-r from-gray-50 shadow-sm shadow-gray-100 bg-[length:200%_200%]"
data-v-bd9b9d04=""
>
 
 
</div>
<span
class="sr-only"
Expand Down
4 changes: 2 additions & 2 deletions src/components/Section/WSection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('WSection', () => {
const wrapper = mount(WSection, {
props: {
frameClasses: 'bg-black-950',
contentClasses: 'grid justify-items-center',
contentClasses: 'grid justify-items-center'
},
slots: {
content: h('p', 'Section content')
Expand All @@ -17,4 +17,4 @@ describe('WSection', () => {

expect(wrapper.element).toMatchSnapshot()
})
})
})
2 changes: 1 addition & 1 deletion src/components/Section/WSection.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ export const Section: Story = {
}),
args: {
frameClasses: 'bg-black-950',
contentClasses: 'grid justify-items-center',
contentClasses: 'grid justify-items-center'
}
}
2 changes: 1 addition & 1 deletion src/components/Spinner/WSpinner.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ describe('WSpinner', () => {

expect(wrapper.element).toMatchSnapshot()
})
})
})
2 changes: 1 addition & 1 deletion src/components/Spinner/WSpinner.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ export const Section: Story = {
return { args }
},
template: `<WSpinner />`
}),
})
}
18 changes: 15 additions & 3 deletions src/components/Spinner/WSpinner.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
<template>
<div role="status">
<svg aria-hidden="true" class="w-8 h-8 text-gray-100 animate-spin fill-wit-blue-500" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor" />
<path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill" />
<svg
aria-hidden="true"
class="w-8 h-8 text-gray-100 animate-spin fill-wit-blue-500"
viewBox="0 0 100 101"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
fill="currentColor"
/>
<path
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
fill="currentFill"
/>
</svg>
<span class="sr-only">Loading...</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export default {
WButton,
WFooter,
WLink,
WNavbar,
WNavbar
}

0 comments on commit 32edd8c

Please sign in to comment.