Last active
July 6, 2022 13:39
-
-
Save Akronae/273c9391062c5f890d2b4c0c1c9b4cda to your computer and use it in GitHub Desktop.
Vue JSX Babel
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
<script> | |
import FloatingLabelTextInput from '@/components/FloatingLabelTextInput' | |
import Button from '@/components/Button' | |
import StringUtils from '@/utils/stringUtils' | |
export default | |
{ | |
name: 'set-password', | |
render () | |
{ | |
return ( | |
<div id='set-password-view'> | |
<floating-label-text-input placeholder='Nouveau mot de passe' v-model={this.newPassword} /> | |
<div>Votre nouveau mot de passe a {this.newPassword.length} lettres !</div> | |
<Button class='save-password-button' text='Enregistrer mon nouveau mot de passe' | |
disabled={StringUtils.isEmptyString(this.newPassword)} | |
on-click={this.savePassword} /> | |
</div> | |
) | |
}, | |
data () | |
{ | |
return { | |
newPassword: '', | |
} | |
}, | |
mounted () | |
{ | |
}, | |
methods: | |
{ | |
savePassword () | |
{ | |
// ... | |
} | |
}, | |
components: | |
{ | |
FloatingLabelTextInput, | |
Button | |
} | |
} | |
</script> | |
<style lang='less'> | |
@import '~@/styles/main.less'; | |
#set-password-view | |
{ | |
.save-password.button | |
{ | |
width: -webkit-fill-available; | |
.OnDesktop({ | |
width: 100px; | |
}); | |
} | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment