@swr-data-lab/components 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -61,5 +61,5 @@
61
61
  "svelte": "./src/index.js"
62
62
  }
63
63
  },
64
- "version": "1.3.1"
64
+ "version": "1.4.0"
65
65
  }
@@ -11,7 +11,6 @@
11
11
  color: white;
12
12
  background: $color-violetblue;
13
13
  border-radius: $border-radius-container;
14
- margin: 0 1rem;
15
14
  padding: 1.5rem;
16
15
  @include bp($break-tablet) {
17
16
  padding: 2.5rem;
@@ -25,36 +25,43 @@
25
25
  <Story name="Basic HighlightCard">
26
26
  <HighlightCard
27
27
  topline="Die letzte Großspende liegt bei"
28
- highlight="375.000"
29
- highlightSecondary="Euro"
28
+ value="375.000"
29
+ unit="Euro"
30
30
  subline="Der Betrag ging am 7. Januar von Dr. Kim Musterperson ein."
31
31
  />
32
32
  </Story>
33
33
 
34
34
  <Story name="Basic HighlightCard">
35
- <div class="columns">
35
+ <div class="highlight-cards">
36
36
  <HighlightCard
37
37
  topline="Im aktuellen Jahr wurden bisher"
38
- highlight="375.000"
39
- highlightSecondary="€"
38
+ value="375.000"
39
+ unit="€"
40
40
  subline="an Parteien gespendet."
41
41
  />
42
42
  <HighlightCard
43
43
  topline="Die letzte Großspende liegt bei"
44
- highlight="37.500"
45
- highlightSecondary="€"
44
+ value="37.500"
45
+ unit="€"
46
46
  subline="Der Betrag ging am 7. Januar von Dr. Kim Musterperson ein."
47
47
  />
48
48
  </div>
49
49
  </Story>
50
50
 
51
51
  <style>
52
- .columns {
53
- display: flex;
54
- margin-top: 2rem;
52
+ .highlight-cards {
53
+ @media (min-width: 900px) {
54
+ margin: 0 -1rem;
55
+ display: flex;
56
+ }
55
57
  }
56
58
 
57
- :global(.columns > *) {
58
- flex: 1;
59
+ :global(.highlight-cards > *) {
60
+ margin: 1rem 0;
61
+
62
+ @media (min-width: 900px) {
63
+ margin: 2rem 1rem;
64
+ flex: 1;
65
+ }
59
66
  }
60
67
  </style>
@@ -2,11 +2,9 @@
2
2
  import Card from '../Card/Card.svelte';
3
3
 
4
4
  export let topline = '';
5
- export let highlight = '';
6
- export let highlightSecondary = '';
5
+ export let value = '';
6
+ export let unit = '';
7
7
  export let subline = '';
8
- export let alignCards = true;
9
- export let maxWidth = '500px';
10
8
  </script>
11
9
 
12
10
  <Card>
@@ -18,9 +16,9 @@
18
16
  {/if}
19
17
  <div class="middle">
20
18
  <span class="underline">
21
- {highlight}
19
+ {value}
22
20
  </span>
23
- {highlightSecondary}
21
+ {unit}
24
22
  </div>
25
23
  <div class="bottom">
26
24
  {@html subline}