๐Ÿ“ฆ payloadcms / website

๐Ÿ“„ toasts.scss ยท 118 lines
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118.payload-toast-container {
  padding: 0;
  margin: 0;

  .payload-toast-close-button {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--theme-bg);
    transform: translate(-40%, -40%);
    border: none;

    svg {
      width: 0.8rem;
      height: 0.8rem;
    }

    [dir='RTL'] & {
      right: unset;
      left: 0.5rem;
    }
  }

  .toast-title {
    line-height: 1rem;
    margin-right: 1rem;
  }

  .payload-toast-item {
    padding: 0.8rem;
    color: var(--theme-elevation-800);
    font-style: normal;
    font-weight: normal;
    font-size: 16px;
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
    border-radius: 4px;
    border: 1px solid var(--theme-border-color);
    background: var(--theme-input-bg);
    box-shadow:
      0px 10px 4px -8px rgba(0, 2, 4, 0.02),
      0px 2px 3px 0px rgba(0, 2, 4, 0.05);

    .toast-content {
      transition: opacity 100ms cubic-bezier(0.55, 0.055, 0.675, 0.19);
      width: 100%;
    }

    &[data-front='false'] {
      .toast-content {
        opacity: 0;
      }
    }

    &[data-expanded='true'] {
      .toast-content {
        opacity: 1;
      }
    }

    .toast-icon {
      width: 0.8rem;
      height: 0.8rem;
      margin: 0;
      display: flex;
      align-items: center;
      justify-content: center;

      & > * {
        width: 1.2rem;
        height: 1.2rem;
      }
    }

    &.toast-warning {
      color: var(--theme-warning-300);
      border-color: var(--theme-warning-700);
      background-color: var(--theme-warning-900);

      .payload-toast-close-button {
        color: var(--theme-warning-600);
      }
    }

    &.toast-error {
      color: var(--theme-error-300);
      border-color: var(--theme-error-700);
      background-color: var(--theme-error-900);

      .payload-toast-close-button {
        color: var(--theme-error-600);
      }
    }

    &.toast-success {
      color: var(--theme-success-300);
      border-color: var(--theme-success-700);
      background-color: var(--theme-success-900);

      .payload-toast-close-button {
        color: var(--theme-elevation-600);
      }
    }

    &.toast-info {
      color: var(--theme-elevation-800);
      border-color: var(--theme-elevation-250);
      background-color: var(--theme-elevation-100);

      .payload-toast-close-button {
        color: var(--theme-elevation-600);
      }
    }
  }
}