components
1 year ago
constants.ts
1 year ago
helpers.ts
1 year ago
index.tsx
1 year ago
style.scss
1 year ago
types.ts
1 year ago
style.scss
133 lines
| 1 | @use 'sass:math'; |
| 2 | @import '@wordpress/base-styles/colors'; |
| 3 | @import '@wordpress/base-styles/variables'; |
| 4 | |
| 5 | $spacing-xs: $grid-unit-05; // 4px |
| 6 | $spacing-sm: $grid-unit-10; // 8px |
| 7 | $spacing-md: $grid-unit-15; // 12px |
| 8 | $spacing-lg: $grid-unit-20; // 16px |
| 9 | |
| 10 | .newsletter-widget { |
| 11 | |
| 12 | &__header{ |
| 13 | padding: $spacing-md; |
| 14 | margin-bottom: $spacing-md; |
| 15 | } |
| 16 | |
| 17 | &__heading { |
| 18 | font-weight: $font-weight-medium !important; |
| 19 | } |
| 20 | |
| 21 | &__footer { |
| 22 | background-color: $gray-100; |
| 23 | padding: $spacing-md; |
| 24 | } |
| 25 | |
| 26 | &__footer-msg { |
| 27 | margin: 0; |
| 28 | margin-bottom: $spacing-md; |
| 29 | } |
| 30 | |
| 31 | &__footer-list { |
| 32 | margin: 0; |
| 33 | padding-left: $spacing-md; |
| 34 | list-style-type: disc; |
| 35 | columns: 2; |
| 36 | } |
| 37 | |
| 38 | &__stat-label { |
| 39 | margin-left: $spacing-xs; |
| 40 | text-decoration: none; |
| 41 | } |
| 42 | |
| 43 | &__stats { |
| 44 | display: flex; |
| 45 | gap: $spacing-md; |
| 46 | flex-wrap: wrap; |
| 47 | width: 100%; |
| 48 | |
| 49 | > :first-child { |
| 50 | margin-right: $spacing-md; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | &__icon { |
| 55 | display: inline-flex; |
| 56 | flex-direction: column; |
| 57 | align-items: flex-start; |
| 58 | } |
| 59 | |
| 60 | &__stat-item { |
| 61 | display: flex; |
| 62 | align-items: center; |
| 63 | gap: $spacing-xs; |
| 64 | text-decoration: none; |
| 65 | } |
| 66 | |
| 67 | &__chart-container { |
| 68 | padding: 0 $spacing-md; |
| 69 | } |
| 70 | |
| 71 | &__chart { |
| 72 | width: 100%; |
| 73 | box-sizing: border-box; |
| 74 | padding: 0 $spacing-md $spacing-md; |
| 75 | } |
| 76 | |
| 77 | a { |
| 78 | text-decoration: none; |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | .subscribers-chart { |
| 83 | width: 100%; |
| 84 | height: 200px; |
| 85 | |
| 86 | &__tooltip { |
| 87 | background: $white; |
| 88 | padding: $spacing-sm; |
| 89 | border-radius: $radius-medium; |
| 90 | box-shadow: $elevation-x-small; |
| 91 | font-size: $font-size-small; |
| 92 | color: $gray-900; |
| 93 | min-width: 120px; |
| 94 | } |
| 95 | |
| 96 | &__tooltip-date { |
| 97 | font-weight: $font-weight-medium; |
| 98 | margin-bottom: $spacing-xs; |
| 99 | } |
| 100 | |
| 101 | &__tooltip-stats { |
| 102 | display: flex; |
| 103 | flex-direction: column; |
| 104 | gap: math.div( $spacing-xs, 2 ); |
| 105 | } |
| 106 | |
| 107 | &__tooltip-stat { |
| 108 | display: flex; |
| 109 | align-items: center; |
| 110 | } |
| 111 | |
| 112 | &__tooltip-indicator { |
| 113 | width: $spacing-sm; |
| 114 | height: $spacing-sm; |
| 115 | border-radius: $radius-round; |
| 116 | margin-right: $spacing-xs; |
| 117 | } |
| 118 | |
| 119 | &__legend { |
| 120 | display: flex; |
| 121 | justify-content: center; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | // wp-admin overrides |
| 126 | #jetpack_newsletter_dashboard_widget { |
| 127 | |
| 128 | .inside { |
| 129 | padding: 0; |
| 130 | margin: 0; |
| 131 | } |
| 132 | } |
| 133 |