-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
104 additions
and
162 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 |
---|---|---|
@@ -1,8 +1,19 @@ | ||
:root { | ||
/* Colors */ | ||
--color-primary: #355086; | ||
--color-on-primary: #ffffff; | ||
--color-primary-lighter: hsl(220, 43%, 65%); | ||
--color-primary-focus-ring: hsl(220, 43%, 37%, 20%); | ||
--color-secondary: #57c18b; | ||
--color-tertiary: #f05067; | ||
|
||
--color-on-surface: #022826; | ||
--color-card-background: white; | ||
|
||
/* Shadows */ | ||
--shadow-small: 0px 2px 2px rgba(0, 0, 0, .04); | ||
--shadow-border: 0 0 0 1px rgba(0, 0, 0, .08); | ||
--shadow-border-small: var(--shadow-border), var(--shadow-small); | ||
|
||
--radius: 0.75rem; | ||
} |
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
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
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,109 +1,54 @@ | ||
<template> | ||
<div class="container-button"> | ||
<span v-if="title">{{ title }}</span> | ||
<span v-else class="empty"></span> | ||
<button @click="navigateToRoute()" :class="buttonClass"> | ||
<ChevronLeft/> | ||
{{ text }} | ||
<ChevronRight/> | ||
</button> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed } from 'vue'; | ||
import ChevronLeft from '@/assets/icons/chevron_left.svg'; | ||
import ChevronRight from '@/assets/icons/chevron_right.svg'; | ||
import router from '@/router'; | ||
// Déclarez les props | ||
const props = defineProps({ | ||
text: String, | ||
title: String, | ||
typebutton: String, | ||
link: String, | ||
}); | ||
const navigateToRoute = () => { | ||
if (props.link) { | ||
router.push(props.link); | ||
} | ||
}; | ||
const buttonClass = computed(() => { | ||
if (props.typebutton === "blue") { | ||
return "button blue"; | ||
} else { | ||
return "button white"; | ||
} | ||
}); | ||
import type { RouterLinkProps } from "vue-router"; | ||
withDefaults(defineProps<{ | ||
text: string; | ||
variant: 'primary' | 'secondary'; | ||
type?: 'button' | 'submit' | ||
link?: RouterLinkProps['to']; | ||
}>(), { type: 'button' }); | ||
</script> | ||
|
||
<template> | ||
<router-link v-if="link" :class="variant" :to="link"> | ||
<ChevronLeft/> | ||
{{ text }} | ||
<ChevronRight/> | ||
</router-link> | ||
<button v-else :class="variant" :type="type"> | ||
<ChevronLeft/> | ||
{{ text }} | ||
<ChevronRight/> | ||
</button> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
.container-button { | ||
button, | ||
a { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
.empty { | ||
padding: 30px 0 8px 0; | ||
} | ||
span { | ||
font-size: 15px; | ||
font-weight: bold; | ||
font-stretch: normal; | ||
font-style: normal; | ||
line-height: 2; | ||
letter-spacing: normal; | ||
text-align: center; | ||
text-transform: uppercase; | ||
color: #355086; | ||
padding: 0 0 8px 0; | ||
} | ||
.button { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: center; | ||
padding: 8.4px 13px 10px; | ||
border-radius: 12px; | ||
text-align: center; | ||
font-size: 20px; | ||
font-weight: bold; | ||
font-stretch: normal; | ||
font-style: normal; | ||
line-height: normal; | ||
letter-spacing: 0.24px; | ||
margin: 0 82.5px 0 82.5px; | ||
} | ||
} | ||
button:hover { | ||
padding: 10px 1rem; | ||
border-radius: var(--radius); | ||
text-align: center; | ||
font-size: 20px; | ||
line-height: 24px; | ||
font-weight: bold; | ||
border: none; | ||
cursor: pointer; | ||
} | ||
.blue { | ||
background-color: #355086; | ||
border: 2px solid white; | ||
color: white; | ||
} | ||
.white { | ||
background-color: white; | ||
border: 2px solid #57c18b; | ||
color: #355086; | ||
} | ||
@media screen and (max-width: 768px) { | ||
.button { | ||
margin: 0 19px 0 19px !important; | ||
&.primary { | ||
background-color: var(--color-primary); | ||
color: var(--color-on-primary); | ||
border: 2px solid var(--color-on-primary); | ||
} | ||
.container-button > .button { | ||
font-size: 18px; | ||
&.secondary { | ||
background-color: white; | ||
border: 2px solid var(--color-secondary); | ||
color: var(--color-primary); | ||
} | ||
} | ||
</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
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.