File size: 1,391 Bytes
74aacd5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.toast-viewpoint {
  position: fixed;
  bottom: 48px;
  right: 1.5rem;
  display: flex;
  flex-direction: row;
  padding: 25px;
  gap: 10px;
  max-width: 100vw;
  margin: 0;
  z-index: 999999;

  &:focus-visible {
    outline: none;
  }
}

.toast-root {
  border: 1px solid var(--border-color-light);
  background-color: var(--page-bg);
  border-radius: 0.6rem;
  padding: 15px;
  display: flex;
  align-items: center;

  gap: 12px;

  &[data-state='open'] {
    animation: slideIn 150ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  &[data-state='close'] {
    animation: opacityReveal 100ms ease-in forwards;
  }

  &[data-state='cancel'] {
    transform: translateX(0);
    animation: transform 100ms ease-out;
  }

  &.error {
    border: 1px solid var(--error-color);
  }

  &.success {
    border: 1px solid var(--success-color);
  }
}

.error-icon {
  height: 24px;
  width: 24px;
  color: var(--error-color);
}

.success-icon {
  height: 24px;
  width: 24px;
  color: var(--success-color);
}

.loading-icon {
  display: flex;
  align-items: center;
  animation-name: spin;
  animation-duration: 1500ms;
  animation-iteration-count: infinite;
  transform-origin: center center;
  animation-timing-function: linear;
}

.toast-icon {
  display: flex;
  align-items: center;
}

.toast-desc {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--text-color);
  min-width: 240px;
}