Skip to content

Commit

Permalink
feat: updated modal slot options
Browse files Browse the repository at this point in the history
  • Loading branch information
Amirah Chamble authored and Amirah Chamble committed Jun 3, 2019
1 parent e3106bd commit 94065b5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
9 changes: 6 additions & 3 deletions dev/views/Modals.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
fixed
>
<Search32 slot="headingIcon"/>

<template slot="headingExtra">
<ButtonFeatureLabel >
<template slot="icon"> <Home24/> </template>
Expand All @@ -68,12 +69,16 @@
<template slot="label"> Set as Favorite </template>
</ButtonFeatureLabel>
</template>
<FishTankText>Modal Content.</FishTankText>

<FishTankText>
<LoremIpsum/>
</FishTankText>

<template slot="footerRight">
<FishTankText>Clear All</FishTankText>
<button-primary>Action</button-primary>
</template>

<template slot="footerLeft">
<ButtonFeatureLabel >
<template slot="icon"> <AlertAdd24/> </template>
Expand Down Expand Up @@ -131,8 +136,6 @@ export default Vue.extend({
modal1: false,
modal2: false,
dialog: false,
// enhanced modal
modal3: false,
}
}
Expand Down
19 changes: 17 additions & 2 deletions src/components/FishTankModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
v-else-if="$slots.footerLeft || $slots.footerRight"
class="modal__footer-container"
>
<div>
<div class="modal__footerLeft">
<slot
name="footerLeft"
/>
</div>
<div>
<div class="modal__footerRight">
<slot name="footerRight"/>
</div>
</div>
Expand Down Expand Up @@ -611,4 +611,19 @@ export default Vue.extend({
display: block;
}
.modal__footerLeft{
width: 50%;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
.modal__footerRight{
width: 50%;
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
}
</style>

0 comments on commit 94065b5

Please sign in to comment.