mirror of
https://github.com/bitwarden/browser
synced 2026-02-15 16:05:03 +00:00
allow unstyled button to inherit color
This commit is contained in:
@@ -130,7 +130,8 @@ const getButtonStyles = (buttonType: ButtonType, size: ButtonSize): string[] =>
|
||||
const isOutline = normalizedType.includes("outline");
|
||||
const isGhost = normalizedType.includes("ghost");
|
||||
const isSecondary = normalizedType === "secondary";
|
||||
const isSolid = !isOutline && !isGhost;
|
||||
const isUnstyled = normalizedType === "unstyled";
|
||||
const isSolid = !isOutline && !isGhost && !isUnstyled;
|
||||
|
||||
if (isOutline || isGhost) {
|
||||
baseStyles.push("tw-bg-transparent", "hover:tw-bg-bg-hover");
|
||||
@@ -144,6 +145,10 @@ const getButtonStyles = (buttonType: ButtonType, size: ButtonSize): string[] =>
|
||||
baseStyles.push("tw-border-transparent", "tw-bg-clip-padding", "hover:tw-border-bg-hover");
|
||||
}
|
||||
|
||||
if (isUnstyled) {
|
||||
baseStyles.push("tw-text-current");
|
||||
}
|
||||
|
||||
return [...baseStyles, ...buttonStyles[buttonType], ...getButtonSizeStyles(size)];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user