-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #663 from Sifchain/feature/guided
[ui] guided liquidity pool calculations
- Loading branch information
Showing
8 changed files
with
277 additions
and
72 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 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,105 @@ | ||
<template> | ||
<div @click="onClickButton()" class="checkbox-container"> | ||
<div id="sdf" :data-checked="checked" /> | ||
<label for="sdf"> | ||
{{toggleLabel}} | ||
<span></span> | ||
</label> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { computed } from "@vue/reactivity"; | ||
export default { | ||
props: { | ||
toggleLabel: { type: String, default: null }, | ||
checked: { type: Boolean, default: true }, | ||
}, | ||
emits: [ | ||
"handleToggle", | ||
], | ||
setup(props) { | ||
const toggled = computed(() => { | ||
return props.checked | ||
}); | ||
return { | ||
toggled | ||
} | ||
}, | ||
methods: { | ||
onClickButton (event) { | ||
this.$emit('clicked', '') | ||
}, | ||
}, | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.checkbox-container { | ||
display: flex; | ||
justify-content: flex-end; | ||
} | ||
div#sdf { | ||
display: none; | ||
+ label { | ||
display: flex; | ||
align-items: center; | ||
color: #818181; | ||
cursor: pointer; | ||
font-size: 12px; | ||
font-weight: 600; | ||
span { | ||
display: block; | ||
width: 32px; | ||
height: 15.84px; | ||
margin: 0 0 0 5.328px; | ||
border-radius: 1000px; | ||
background: rgba(129, 129, 129, 0.5); | ||
position: relative; | ||
transition: background 0.2s ease-in; | ||
&:after { | ||
display: block; | ||
content: ""; | ||
width: 12px; | ||
height: 12px; | ||
background: #fff; | ||
border-radius: 50%; | ||
position: absolute; | ||
left: 2px; | ||
top: 1.8px; | ||
transition: left 0.2s ease-in; | ||
} | ||
} | ||
&:before, | ||
&:after { | ||
font-size: 20px; | ||
font-weight: 600; | ||
padding-top: 3px; | ||
transition: opacity 0.2s ease-in; | ||
} | ||
} | ||
&[data-checked=true] + label { | ||
span { | ||
background: rgb(202, 169, 58); | ||
&:after { | ||
left: 18.5px; | ||
} | ||
} | ||
&:before { | ||
opacity: 0.5; | ||
} | ||
&:after { | ||
opacity: 1; | ||
} | ||
} | ||
} | ||
</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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<template> | ||
<div class="raised-panel-row"> | ||
<slot></slot> | ||
</div> | ||
</template> | ||
<style lang="scss" scoped> | ||
.raised-panel-row { | ||
display: flex; | ||
} | ||
</style> |
Oops, something went wrong.
a5d8dae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for ui ready!
✅ Preview
https://ui-9fl9d64ry-sifchain.vercel.app
https://develop.sifchain.vercel.app
Built with commit a5d8dae.
This pull request is being automatically deployed with vercel-action