Skip to content

Commit

Permalink
Merge pull request #49 from LucasWerey/fix/21
Browse files Browse the repository at this point in the history
fix(dslib): fix selectfield and offerCard
  • Loading branch information
LucasWerey authored Jan 25, 2024
2 parents 2edd1c1 + 64046f4 commit b2f002e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lucaswerey/dslib-pfe",
"version": "0.0.68",
"version": "0.0.69",
"private": false,
"main": "./lib/index.umd.js",
"module": "./lib/index.mjs",
Expand Down
4 changes: 4 additions & 0 deletions src/components/CTA/SelectField/SelectField.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ const controls = reactive<Controls>({
{ value: 'Mois', label: 'Mois' },
{ value: 'Années', label: 'Années' },
{ value: 'Semaines', label: 'Semaines' },
{ value: 'Jours', label: 'Jours' },
{ value: 'Jours', label: 'Jours' },
{ value: 'Jours', label: 'Jours' },
{ value: 'Jours', label: 'Jours' },
{ value: 'Jours', label: 'Jours' }
],
default: 'Mois',
Expand Down
25 changes: 23 additions & 2 deletions src/components/CTA/SelectField/SelectField.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="flex h-[72px] w-[200px] flex-col gap-2">
<div class="flex h-[72px] w-[200px] flex-col gap-2" @focusout="open = false">
<h1 class="font-eina1 text-2 font-bold uppercase text-basic-black">
{{ title }}
</h1>
Expand All @@ -18,7 +18,7 @@
color="darkgrey"
/>
</div>
<div class="items absolute z-10 w-full" v-show="open">
<div class="items scrollbar absolute z-10 max-h-[150px] w-full overflow-auto" v-show="open">
<div
v-for="(option, i) of options"
:key="i"
Expand Down Expand Up @@ -75,3 +75,24 @@ const handleClick = (option: SelectFieldOption) => {
const emit = defineEmits(['update:modelValue'])
</script>

<style scoped>
.scrollbar::-webkit-scrollbar {
width: 4px;
}
.scrollbar::-webkit-scrollbar-track {
@apply bg-primary-lightmoonstone;
border-radius: 40px;
}
.scrollbar::-webkit-scrollbar-thumb {
@apply bg-primary-moonstone;
border-radius: 40px;
}
.scrollbar::-webkit-scrollbar-thumb:hover {
@apply bg-primary-moonstone;
border-radius: 40px;
}
</style>
4 changes: 2 additions & 2 deletions src/components/Containment/OfferCard/OfferCard.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</ControlDescription>
</template>

<template #default>
<Variant title="playground" auto-props-disabled>
<OfferCard
:type="controls.type"
:title="controls.title"
Expand All @@ -55,7 +55,7 @@
@seeOffer="() => {}"
@createOffer="() => {}"
/>
</template>
</Variant>
</Story>
</template>

Expand Down
2 changes: 1 addition & 1 deletion src/components/Containment/OfferCard/OfferCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
/>
</div>
<p class="font-eina1 text-3 font-semibold text-basic-black">
{{ nCandidates }} candidats
{{ nCandidates ?? 0 }} {{ (nCandidates ?? 0) > 1 ? 'candidats' : 'candidat' }}
</p>
</div>
<Button
Expand Down

0 comments on commit b2f002e

Please sign in to comment.