-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: APPS-2956 flexible-divider-way finder (#621)
* feat: start flexibile divider way finder * feat: finish horizontal divider * chore: lint * fix: errors with empty story (?) * fix: broken spec, restore story * fix: story url --------- Co-authored-by: Jess Divers <[email protected]>
- Loading branch information
1 parent
03c8948
commit 125cfe7
Showing
6 changed files
with
75 additions
and
1 deletion.
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,19 @@ | ||
<script setup lang="ts"> | ||
import type { PropType } from 'vue' | ||
import { defineProps } from 'vue' | ||
import type { FlexibleHorizontalDividerBlock } from '@/types/flexible_types' | ||
// COMPONENTS | ||
import DividerWayFinder from '@/lib-components/DividerWayFinder.vue' | ||
const { block } = defineProps({ | ||
block: { | ||
type: Object as PropType<FlexibleHorizontalDividerBlock>, | ||
default: () => { }, | ||
}, | ||
}) | ||
</script> | ||
|
||
<template> | ||
<DividerWayFinder v-if="block.horizontalDivider" /> | ||
</template> |
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,10 @@ | ||
describe('FLEXIBLE / Horizontal Divider', () => { | ||
it('Default', () => { | ||
cy.visit( | ||
'/iframe.html?id=flexible-horizontal-divider--default&args=&viewMode=story' | ||
) | ||
cy.get('.divider-way-finder').should('exist') | ||
|
||
cy.percySnapshot('FLEXIBLE / HorizontalDivider: Default') | ||
}) | ||
}) |
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,38 @@ | ||
import FlexibleHorizontalDivider from '@/lib-components/Flexible/HorizontalDivider.vue' | ||
|
||
export default { | ||
title: 'FLEXIBLE / Horizontal Divider', | ||
component: FlexibleHorizontalDivider, | ||
} | ||
|
||
const mockHorizontalDivider = { | ||
id: '1234556', | ||
typeHandle: 'horizontalDivider', | ||
horizontalDivider: true | ||
} | ||
|
||
// Default | ||
export function Default() { | ||
return { | ||
data() { | ||
return { | ||
block: mockHorizontalDivider, | ||
} | ||
}, | ||
components: { FlexibleHorizontalDivider }, | ||
template: '<flexible-horizontal-divider :block="block" />', | ||
} | ||
} | ||
|
||
// Hidden Divider | ||
export function Hidden() { | ||
return { | ||
data() { | ||
return { | ||
block: { ...mockHorizontalDivider, horizontalDivider: false }, | ||
} | ||
}, | ||
components: { FlexibleHorizontalDivider }, | ||
template: '<flexible-horizontal-divider :block="block" />', | ||
} | ||
} |
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
125cfe7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://ucla-library-storybook.netlify.app as production
🚀 Deployed on https://66f6ff09cde35bc7a2bbc67a--ucla-library-storybook.netlify.app