Skip to content

Commit

Permalink
MR review correction
Browse files Browse the repository at this point in the history
  • Loading branch information
olyn-octo committed Jun 26, 2024
1 parent 01d9c90 commit 0c8de53
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
4 changes: 1 addition & 3 deletions src/stories/Button.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ const meta = {
tags: ['autodocs'],
argTypes: {
size: { control: 'select', options: ['small', 'medium', 'large'] },
type: { options: ['primary', 'seondary', 'destructive'] },
backgroundColor: { control: 'color' },
type: { options: ['primary', 'secondary', 'destructive'] },
},
args: {
primary: false,
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
onClick: fn(),
},
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<button type="button" :class="classes" @click="onClick" >{{ label }} </button>
</template>

<script lang="ts"setup>
<script lang="ts" setup>
import { computed } from 'vue';
import "@/tokens/colors.css";
Expand All @@ -15,9 +15,9 @@ type ButtonProps = {
*/
label: string,
/**
* type of the button
* Button type
*/
type ?: 'primary'| 'secondary' | 'destructive',
type?: 'primary'| 'secondary' | 'destructive',
/**
* size of the button
Expand Down
12 changes: 5 additions & 7 deletions src/stories/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ button {

.storybook-button--secondary:hover {
border: 2px solid var(--color-button-border-secondary-hover);
box-shadow: 2px 4px 7px 2px rgb(from var(--color-button-shadow-primary) r g b / 30%);
box-shadow: 2px 4px 7px 2px rgb(from var(--color-button-shadow-secondary) r g b / 30%);
color:var(--color-button-text-secondary-hover);
}

Expand All @@ -52,19 +52,17 @@ button {
.storybook-button--destructive {
background-color:var(--color-button-background-destructive);
border: 1px solid var(--color-button-border-destructive);
color: #FFF;
color: var(--color-button-text-destructive);
}

.storybook-button--destructive:hover {
background-color: var(--color-button-background-destructive);
border-color: var(--color-button-background-destructive);
box-shadow: 2px 4px 7px 2px var(--color-button-shadow-destructive);
/*remplacer par des tokens de couleurs pour la shadow ou pas ?*/
border-color: var(--color-button-shadow-destructive);
box-shadow: 2px 4px 7px 2px rgb(from var(--color-button-shadow-destructive) r g b / 30%);
}

.storybook-button--destructive:active {
box-shadow: 0px 2px 3px 1px rgba(241, 176, 174);
/*remplacer par des tokens pour la shadow ou pas ?*/
box-shadow: 0px 2px 3px 1px rgb(from var(--color-button-shadow-destructive-active) r g b / 60%);
}

/* BUTTON SIZES*/
Expand Down
5 changes: 3 additions & 2 deletions src/tokens/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@
--color-button-shadow-secondary-active: var(--color-navy-500);


--color-button-text-destructive:#FFF;
--color-button-text-destructive: white;
--color-button-background-destructive:var(--color-red-600);
--color-button-border-destructive:var(--color-red-500);
--color-button-shadow-destructive:var(--color-red-200);
--color-button-shadow-destructive:var(--color-red-500);
--color-button-shadow-destructive-active:var(--color-red-200);
/*TODO* variablisier les couleurs primary*/
}

Expand Down

0 comments on commit 0c8de53

Please sign in to comment.