0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00

🐛 Fix notification modal styles

This commit is contained in:
Eva 2024-01-09 11:20:05 +01:00 committed by Andrey Antukh
parent 9c35652043
commit 443d157dbe
3 changed files with 44 additions and 8 deletions

View file

@ -1060,8 +1060,10 @@
:links [{:label (tr "workspace.updates.more-info") :links [{:label (tr "workspace.updates.more-info")
:callback do-more-info}] :callback do-more-info}]
:actions [{:label (tr "workspace.updates.update") :actions [{:label (tr "workspace.updates.update")
:type :primary
:callback do-update} :callback do-update}
{:label (tr "workspace.updates.dismiss") {:label (tr "workspace.updates.dismiss")
:type :secondary
:callback do-dismiss}] :callback do-dismiss}]
:tag :sync-dialog))))))) :tag :sync-dialog)))))))

View file

@ -46,17 +46,22 @@
content content
(for [[index link] (d/enumerate links)] (for [[index link] (d/enumerate links)]
[:* {:key (dm/str "link-" index)} [:* {:key (dm/str "link-" index)}
" " [:& lb/link-button {:class "link" " " [:& lb/link-button {:class (stl/css :link)
:on-click (:callback link) :on-click (:callback link)
:value (:label link)}]])] :value (:label link)}]])]
(when (or (= controls :bottom-actions) (= controls :inline-actions)) (when (or (= controls :bottom-actions) (= controls :inline-actions))
[:div {:class (stl/css :actions)} [:div {:class (stl/css :actions)}
(for [action actions] (for [action actions]
[:button {:key (uuid/next) [:button {:key (uuid/next)
:class (stl/css :action-bnt) :class (stl/css-case :action-btn true
:primary (= :primary (:type action))
:secondary (= :secondary (:type action))
:danger (= :danger (:type action)))
:on-click (:callback action)} :on-click (:callback action)}
(:label action)])])] (:label action)])])]
(when (= controls :close) (when (= controls :close)
[:button {:class (stl/css :btn-close) [:button {:class (stl/css :btn-close)
:on-click on-close} i/close-refactor])]]) :on-click on-close} i/close-refactor])]])

View file

@ -16,6 +16,7 @@
background-color: var(--bg-color); background-color: var(--bg-color);
color: var(--fg-color); color: var(--fg-color);
} }
.warning { .warning {
--bg-color: var(--alert-background-color-warning); --bg-color: var(--alert-background-color-warning);
--fg-color: var(--alert-foreground-color-warning); --fg-color: var(--alert-foreground-color-warning);
@ -30,16 +31,18 @@
--bg-color: var(--alert-background-color-neutral); --bg-color: var(--alert-background-color-neutral);
--fg-color: var(--alert-foreground-color-neutral-active); --fg-color: var(--alert-foreground-color-neutral-active);
} }
.banner.info .icon { .banner.info .icon {
--fg-color: var(--alert-foreground-color-neutral); --fg-color: var(--alert-foreground-color-neutral);
} }
.banner.info:hover .icon { .banner.info:hover .icon {
--fg-color: var(--alert-foreground-color-neutral); --fg-color: var(--alert-foreground-color-neutral);
} }
.wrapper { .wrapper {
display: grid; display: flex;
grid-template-columns: $s-16 1fr $s-40; align-items: center;
padding: $s-8 $s-8 $s-8 $s-16; padding: $s-8 $s-8 $s-8 $s-16;
gap: $s-8; gap: $s-8;
height: 100%; height: 100%;
@ -94,20 +97,46 @@
.content { .content {
@include flexRow; @include flexRow;
gap: $s-8;
flex-grow: 1;
} }
.text { .text {
@include titleTipography; @include titleTipography;
flex-grow: 1;
}
.link {
@include titleTipography;
color: var(--modal-link-foreground-color);
margin: 0;
}
.actions {
@include flexRow;
gap: $s-8;
} }
.action-btn { .action-btn {
@extend .button-tertiary; @extend .button-tertiary;
height: $s-32; @include tabTitleTipography;
width: $s-32; min-height: $s-32;
color: black; min-width: $s-32;
svg { svg {
@extend .button-icon-small; @extend .button-icon-small;
} }
&.primary {
@extend .button-primary;
padding: $s-8 $s-24;
}
&.secondary {
@extend .button-secondary;
padding: $s-8 $s-24;
}
&.danger {
@extend .modal-danger-btn;
padding: $s-8 $s-24;
}
} }
.btn-close { .btn-close {
@ -116,6 +145,6 @@
width: $s-32; width: $s-32;
svg { svg {
@extend .button-icon-small; @extend .button-icon-small;
stroke: black; stroke: var(--icon-foreground);
} }
} }