aboutsummaryrefslogtreecommitdiffstats
path: root/packages/excalidraw/components/ExportDialog.scss
blob: d114f25be65d5328def7357c9eab74139a1ae099 (plain) (blame)
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
119
120
121
122
123
124
125
126
127
128
129
@import "../css/variables.module.scss";

.excalidraw {
  .ExportDialog__preview {
    --preview-padding: calc(var(--space-factor) * 4);

    background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")
      left center;
    text-align: center;
    padding: var(--preview-padding);
    margin-bottom: calc(var(--space-factor) * 3);

    display: flex;
    justify-content: center;
    align-items: center;
  }

  .ExportDialog__preview canvas {
    max-width: calc(100% - var(--preview-padding) * 2);
    max-height: 25rem;
  }

  &.theme--dark .ExportDialog__preview canvas {
    filter: none;
  }

  .ExportDialog__actions {
    width: 100%;
    display: flex;
    grid-gap: calc(var(--space-factor) * 2);
    align-items: top;
    justify-content: space-between;
  }

  @include isMobile {
    .ExportDialog {
      display: flex;
      flex-direction: column;
    }

    .ExportDialog__actions {
      flex-direction: column;
      align-items: center;
    }

    .ExportDialog__actions > * {
      margin-bottom: calc(var(--space-factor) * 3);
    }

    .ExportDialog__preview canvas {
      max-height: 30vh;
    }

    .ExportDialog__dialog,
    .ExportDialog__dialog .Island {
      height: 100%;
      box-sizing: border-box;
    }

    .ExportDialog__dialog .Island {
      overflow-y: auto;
    }
  }

  .ExportDialog--json {
    .ExportDialog-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      justify-items: center;
      row-gap: 2em;

      @media (max-width: 460px) {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        .Card-details {
          min-height: 40px;
        }
      }

      .ProjectName {
        width: fit-content;
        margin: 1em auto;
        align-items: flex-start;
        flex-direction: column;

        .TextInput {
          width: auto;
        }
      }

      .ProjectName-label {
        margin: 0.625em 0;
        font-weight: bold;
      }
    }
  }

  button.ExportDialog-imageExportButton {
    border: 0;

    width: 5rem;
    height: 5rem;
    margin: 0 0.2em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 1rem;
    background-color: var(--button-color);
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.28),
      0 6px 10px 0 rgba(0, 0, 0, 0.14);

    font-family: Cascadia;
    font-size: 1.8em;
    color: $oc-white;

    &:hover {
      background-color: var(--button-color-darker);
    }
    &:active {
      background-color: var(--button-color-darkest);
      box-shadow: none;
    }

    svg {
      width: 0.9em;
    }
  }
}