1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
This commit is contained in:
Daniel Riera
2025-03-17 15:54:45 -04:00
committed by GitHub
parent e8c4c570e9
commit 3f19b6a42b
2 changed files with 6 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
import { css } from "@emotion/css";
import { html } from "lit";
import { html, nothing } from "lit";
import { Theme } from "@bitwarden/common/platform/enums";
@@ -8,7 +8,6 @@ import {
NotificationTypes,
} from "../../../notification/abstractions/notification-bar";
import { spacing, themes } from "../constants/styles";
import { ActionRow } from "../rows/action-row";
import { ButtonRow } from "../rows/button-row";
export function NotificationFooter({
@@ -23,18 +22,13 @@ export function NotificationFooter({
theme: Theme;
}) {
const isChangeNotification = notificationType === NotificationTypes.Change;
const saveNewItemText = i18n.saveAsNewLoginAction;
const buttonText = i18n.saveAction;
return html`
<div class=${notificationFooterStyles({ theme })}>
${isChangeNotification
? ActionRow({
itemText: saveNewItemText,
handleAction: handleSaveAction,
theme,
})
: ButtonRow({ theme, buttonAction: handleSaveAction, buttonText })}
${!isChangeNotification
? ButtonRow({ theme, buttonAction: handleSaveAction, buttonText })
: nothing}
</div>
`;
}
@@ -46,5 +40,6 @@ const notificationFooterStyles = ({ theme }: { theme: Theme }) => css`
:last-child {
border-radius: 0 0 ${spacing["4"]} ${spacing["4"]};
padding-bottom: ${spacing[4]};
}
`;

View File

@@ -57,6 +57,7 @@ const buttonRowStyles = css`
width: 100%;
max-height: 52px;
white-space: nowrap;
padding-top: ${spacing[1]};
> button {
max-width: min-content;