Skip to content

[Toast] Animation duration coupled to CSS via parsed styles #56

Description

@olegpolyakov

Component

Toast

Problem

File: Toast.tsx lines 28-29

JS is coupled to CSS values:

const ANIMATION_OPEN_TIME_MS = Number.parseInt(styles.enterDuration);
const ANIMATION_CLOSE_TIME_MS = Number.parseInt(styles.exitDuration);

Suggested Fix

Use CSS variables or define constants in one place.

Impact

Fragile coupling between JS and CSS

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions