Skip to content

Commit

Permalink
fix: beam story
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan Bansal committed Apr 23, 2024
1 parent 1baff45 commit 11b4aa8
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 42 deletions.
2 changes: 0 additions & 2 deletions beam/src/components/BeamModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@
defineProps<{
showModal: boolean
}>()
defineEmits(['closemodal', 'confirmmodal'])
</script>
15 changes: 2 additions & 13 deletions beam/src/components/Confirm.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
<template>
<div class="beam__modal-confirm">
<h2>Would you like to continue?</h2>
<button class="btn" @click="confirmModal">Yes</button>
<button class="btn" @click="closeModal">No</button>
<button class="btn" @click="$emit('confirmmodal')">Yes</button>
<button class="btn" @click="$emit('closemodal')">No</button>
</div>
</template>

<script setup lang="ts">
const emit = defineEmits(['confirmmodal', 'closemodal'])
const confirmModal = () => {
emit('confirmmodal')
}
const closeModal = () => {
emit('closemodal')
}
</script>
1 change: 0 additions & 1 deletion beam/src/components/ScanInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ onUnmounted(() => {
})
})
</script>
<style scoped></style>
1 change: 0 additions & 1 deletion beam/src/themes/theme.css

This file was deleted.

6 changes: 0 additions & 6 deletions beam/stories/_variables.scss

This file was deleted.

29 changes: 12 additions & 17 deletions beam/stories/default.story.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<template>
<Story title="default">
<Variant title="default">
<BeamModal :showModal="showModal">
<Story>
<Variant>
<BeamModal @confirmmodal="confirmModal" @closemodal="closeModal" :showModal="showModal">
<Confirm @confirmmodal="confirmModal" @closemodal="closeModal" />
</BeamModal>

<Navbar @click="handlePrimaryAction">
<template v-slot:title><h1>ITEMS TO RECEIVE</h1></template>
<template v-slot:navbaraction>DONE</template>
<template #title>
<h1 class="nav-title">Items to Receive</h1>
</template>
<template #navbaraction>Done</template>
</Navbar>

<ListView :items="items" @scrollbottom="loadMoreItems" />
<ActionFooter @click="handlePrimaryAction"> DONE </ActionFooter>
<ActionFooter @click="handlePrimaryAction">Done</ActionFooter>
<ScanInput @scaninput="handleScanInput($event)" />
<BeamModalOutlet @confirmmodal="confirmModal" @closemodal="closeModal"></BeamModalOutlet>
</Variant>
Expand Down Expand Up @@ -126,15 +130,6 @@ const confirmModal = () => {
}
</script>

<style scoped>
@import './theme.scss';
body {
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
flex: 1 0 auto;
height: 100%;
}
<style>
@import url('./../themes/beam.css');
</style>
2 changes: 0 additions & 2 deletions beam/stories/theme.scss

This file was deleted.

File renamed without changes.

0 comments on commit 11b4aa8

Please sign in to comment.