Skip to content

Feature/alert#6

Open
lukaferro wants to merge 46 commits intoByloth:masterfrom
LucaMimmo05:feature/alert
Open

Feature/alert#6
lukaferro wants to merge 46 commits intoByloth:masterfrom
LucaMimmo05:feature/alert

Conversation

@lukaferro
Copy link

No description provided.

@lukaferro lukaferro requested a review from Byloth as a code owner June 20, 2025 08:14
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In linea generale, questo file, non dovrebbe essere toccato.
Non è un problema, però: correggerò - io - durante il merge.

Copy link
Owner

@Byloth Byloth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prova a correggere questi errori. 😉


$primary-color-input-light:#fff;
$primary-color-input-dark:#262525;
$font-family: string.unquote("Baloo 2, Roboto, Helvetica, Arial, sans-serif");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Siamo sicuri che queste righe vengano usate?

*/

$ease-duration: 333ms;
$ease-duration-dark-theme-input: 222ms;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questa va tolta; useremo sia per il tema light che per il tema dark la stessa durata.

--clay-input-primary-color-light : #{variables.$primary-color-input-light};
--clay-input-primary-color-dark : #{variables.$primary-color-input-dark};
--clay-ease-duration: #{variables.$ease-duration};
--clay-ease-duration-dark-theme-input: #{variables.$ease-duration-dark-theme-input};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Come sopra.

template: `
<ClayAlert
:type="args.type"
:class="'clay-alert--' + args.size"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Di questo ne abbiamo già parlato.
Le classi si gestiscono dentro al componente; non fuori.

Prendi spunto da cos'è già stato fatto negli altri componenti.

padding: 2rem 4rem;">
<ClayAlert
:type="args.type"
:variant="args.variant"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La gestione di questa variante non va bene.
Guarda com'è stata gestita nel componente ClayCard.


export const Glass: StoryObj<StoryArgs> = {
args: {
// @ts-expect-error: variant is not in StoryArgs but usato nel template
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se qualcosa dev'essere usato, allora dev'essere definito anche in StoryArgs.

Se è una proprietà che può esistere in maniera opzionale e può essere omessa, usa il ?:

interface StoryArgs
{
    size: "small" | "default" | "large";
    glass?: boolean;
}

@@ -0,0 +1,406 @@
<template>
<ClayCard v-if="visible"
:class="['clay-alert', { 'clay-card--glass': props.variant === 'glass' }]"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ci può stare, la classe definita in linea...
Non mi fa impazzire come sintassi ma è corretta.

Però rimaniamo coerenti a tutti gli altri componenti: usiamo il computed.

@Byloth Byloth mentioned this pull request Jun 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants