-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The first exercise with large and known bugs.
- Loading branch information
Showing
13 changed files
with
664 additions
and
116 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"module": "commonjs" | ||
}, | ||
"exclude": ["node_modules", "**/node_modules/*"] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Large diffs are not rendered by default.
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,40 @@ | ||
<template> | ||
<label class="flex justify-start items-start my-2"> | ||
<div | ||
class="bg-white border-2 rounded border-gray-400 w-6 h-6 flex flex-shrink-0 justify-center items-center mr-2 focus-within:border-blue-500" | ||
> | ||
<input | ||
type="checkbox" | ||
class="opacity-0 absolute" | ||
v-model="$store.state.Interval.selectedIntervals" | ||
:value="key" | ||
:id="key" | ||
/> | ||
<svg | ||
class="fill-current hidden w-4 h-4 text-green-500 pointer-events-none" | ||
viewBox="0 0 20 20" | ||
> | ||
<path d="M0 11l2-2 5 5L18 3l2 2L7 18z"/> | ||
</svg> | ||
</div> | ||
<div class="select-none">{{ key }} ({{ interval.name }})</div> | ||
</label> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "Checkbox", | ||
props: { | ||
value: { | ||
require: true, | ||
}, | ||
id: { | ||
require: true, | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
</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,66 @@ | ||
<template> | ||
<div class="flex items-center mr-4"> | ||
<input :id="id" type="radio" :checked="checked" :value="text" :name="name" v-model="radioButtonValue" class="hidden"/> | ||
|
||
<label :for="id" class="flex items-center cursor-pointer"> | ||
<span class="inline-block w-4 h-4 mr-1 border rounded-full border-grey"></span> | ||
{{ text }} - {{checked}}</label> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "RadioButton", | ||
props: ['name', 'text', 'value', 'checked'], | ||
created() { | ||
// console.log("başla") | ||
// console.log(this.$store.state.Interval.intervalType); | ||
// console.log(this.value) | ||
// console.log("bit") | ||
// if (this.$store.state.Interval.intervalType === this.value) { | ||
// this.isChecked = true; | ||
// } | ||
}, | ||
data() { | ||
return { | ||
id: "radio-id-" + this._uid, | ||
// isChecked: false | ||
} | ||
}, | ||
computed: { | ||
radioButtonValue: { | ||
get: function () { | ||
return this.value | ||
}, | ||
set: function () { | ||
// Communicate the change to parent component so that selectedValue can be updated | ||
this.$emit("selected", this.value) | ||
} | ||
}, | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
input[type="radio"] + label span { | ||
transition: background .2s, | ||
transform .2s; | ||
} | ||
input[type="radio"] + label span:hover, | ||
input[type="radio"] + label:hover span { | ||
background-color: #48bb78; | ||
transform: scale(1.2); | ||
} | ||
input[type="radio"]:checked + label span { | ||
background-color: #48bb78; //bg-blue | ||
box-shadow: 0px 0px 0px 2px white inset; | ||
} | ||
input[type="radio"]:checked + label { | ||
color: #48bb78; //text-blue | ||
}input[type="radio"] + label { | ||
color: #bbc1be; //text-blue | ||
} | ||
</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
Oops, something went wrong.