-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rename to modal & remove isActive state & related actions * Create modal component * Create card, header, body & footer component * Revert to default value of addLocalRepository modal * Split TCardHeader into TCardHeaderHeading & TCardHeaderClose * Appen "Modal" to each mutation name * Loading modals dynamically Use vue dynamic components to load modals dynamic based on the true value * Mixins for closeModal * Change z-index for modal overlay & navbar * Remove `model.sass` styles * Pass modal status as params to mutations * Set modalName to required * Use modal & card components and move to modal dir * Use modal mutations to toggle modals * Create initalizeGitRepository state & mutation * Toggle initalizeGitRepository to repository view * FIX: "closeModel" is not defined * Add spacing b/w exportCommitData inputs * Adjust inputField size in exportCommitData
- Loading branch information
1 parent
06ea0dc
commit a68dccc
Showing
29 changed files
with
801 additions
and
664 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
This file was deleted.
Oops, something went wrong.
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,44 @@ | ||
<template> | ||
<div class="t-card" :style="{ maxWidth: cardSize }"> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "TCard", | ||
props: { | ||
width: { | ||
type: [String, Number], | ||
default: "medium" | ||
} | ||
}, | ||
computed: { | ||
cardSize() { | ||
if (!isNaN(this.width)) { | ||
return this.width + "px"; | ||
} else { | ||
switch (this.width) { | ||
case "small": | ||
return "450px"; | ||
case "medium": | ||
default: | ||
return "700px"; | ||
case "large": | ||
return "100%"; | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="sass"> | ||
.t-card | ||
background-color: white | ||
box-shadow: 0px 11px 15px -7px rgba(0,0,0,0.2), 0px 24px 38px 3px rgba(0,0,0,0.14), 0px 9px 46px 8px rgba(0,0,0,0.12) | ||
border-radius: .35rem | ||
margin-left: 20px | ||
margin-right: 20px | ||
width: 100% | ||
</style> |
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,18 @@ | ||
<template> | ||
<div class="t-card__body"> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "TCardBody" | ||
}; | ||
</script> | ||
|
||
<style lang="sass"> | ||
.t-card__body | ||
display: flex | ||
border-bottom: 1px solid #eee | ||
padding: 1rem | ||
</style> |
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,17 @@ | ||
<template> | ||
<div class="t-card__footer"> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "TCardFooter" | ||
}; | ||
</script> | ||
|
||
<style lang="sass"> | ||
.t-card__footer | ||
display: flex | ||
padding: .8rem 1rem | ||
</style> |
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,18 @@ | ||
<template> | ||
<div class="t-card__header"> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "TCardHeader" | ||
}; | ||
</script> | ||
|
||
<style lang="sass"> | ||
.t-card__header | ||
display: flex | ||
border-bottom: 1px solid #eee | ||
padding: 0.8rem 1rem | ||
</style> |
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,37 @@ | ||
<template> | ||
<div class="t-card__header-close" @click="closeModal(modalName)"> | ||
<close-icon /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import CloseIcon from "../icon/close"; | ||
import closeModalMixin from "../../mixins/closeModal"; | ||
export default { | ||
name: "TCardHeaderClose", | ||
components: { | ||
CloseIcon | ||
}, | ||
mixins: [closeModalMixin], | ||
props: { | ||
modalName: { | ||
type: String, | ||
required: true | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="sass"> | ||
.t-card__header | ||
&-close | ||
cursor: pointer | ||
display: flex | ||
margin-left: auto | ||
svg | ||
width: 20px | ||
height: 20px | ||
stroke: #7f8186 | ||
</style> |
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,17 @@ | ||
<template> | ||
<div class="t-card__header-heading"> | ||
{{ heading }} | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "TCardHeaderHeading", | ||
props: { | ||
heading: { | ||
type: String, | ||
default: "" | ||
} | ||
} | ||
}; | ||
</script> |
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,24 @@ | ||
<template> | ||
<div class="t-modal"> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "Modal" | ||
}; | ||
</script> | ||
|
||
<style lang="sass"> | ||
.t-modal | ||
display: flex | ||
align-items: center | ||
justify-content: center | ||
width: 100% | ||
height: 100% | ||
position: fixed | ||
top: 0 | ||
left: 0 | ||
z-index: 5 | ||
</style> |
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
Oops, something went wrong.