This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
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: init of modals and checkboxtiles
- Loading branch information
Showing
15 changed files
with
349 additions
and
30 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,80 @@ | ||
<template> | ||
<div class="checkbox-tile" :class="{ 'checked': checked }" @click="checked = !checked"> | ||
<div class="checkmark-container"> | ||
<img v-if="checked" src="../../assets/svgs/checkboxtile/check-checked.svg" alt="checkbox checked"/> | ||
<span v-else class="checkmark"/> | ||
</div> | ||
<h5 class="header5">{{ label }} {{ checked ? "(Active)" : "" }}</h5> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
id: String, | ||
label: String, | ||
checked: Boolean | ||
}, | ||
emits: ["onChecked"], | ||
mounted() { | ||
console.log(typeof this.checked) | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.checkbox-tile { | ||
display: flex; | ||
align-items: center; | ||
border-radius: 3px; | ||
border: 2px #8695a8 solid; | ||
width: 100%; | ||
height: 58px; | ||
margin-bottom: 24px; | ||
cursor: pointer; | ||
} | ||
.checkbox-tile:hover, .checkbox-tile.checked { | ||
border: #0055CC solid 2px; | ||
} | ||
.checkbox-tile input { | ||
position: absolute; | ||
opacity: 0; | ||
cursor: pointer; | ||
height: 0; | ||
width: 0; | ||
} | ||
.checkmark-container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: #8695a8; | ||
height: 100%; | ||
width: 28px; | ||
margin-right: 12px; | ||
} | ||
.checkbox-tile:hover .checkmark-container, .checkbox-tile.checked .checkmark-container { | ||
background-color: #0055CC; | ||
} | ||
.checkmark { | ||
border: #8695a8 solid 1px; | ||
width: 18px; | ||
height: 18px; | ||
border-radius: 3px; | ||
margin-left: -1px; | ||
background-color: #fff; | ||
} | ||
.checkmark.checked { | ||
border: #fff solid 1px; | ||
width: 18px; | ||
height: 18px; | ||
border-radius: 3px; | ||
margin-left: -1px; | ||
} | ||
</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
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 |
---|---|---|
@@ -1,7 +1,3 @@ | ||
<script setup> | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<div class="global-header"> | ||
|
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,39 @@ | ||
<script> | ||
import {ref} from "vue"; | ||
export default { | ||
setup() { | ||
const isOpen = ref(false) | ||
return { | ||
isOpen | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<template> | ||
<button @click="isOpen = true">Lagen</button> | ||
<Teleport to="body"> | ||
<div v-if="isOpen" class="modal"> | ||
<h1>Lagen</h1> | ||
<button @click="isOpen = false">Close</button> | ||
</div> | ||
</Teleport> | ||
</template> | ||
|
||
<style scoped> | ||
body { | ||
position: relative; | ||
} | ||
.modal { | ||
display: flex; | ||
flex-direction: column; | ||
position: fixed; | ||
z-index: 999; | ||
top: 0; | ||
bottom: 0; | ||
right: 0; | ||
width: 600px; | ||
background-color: #fff; | ||
} | ||
</style> |
Oops, something went wrong.