mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
[SM-43] create product-switcher (#4189)
* rebase to master * use bit-menu in product switcher; add focusStrategy to bit-menu * recommit locales after rebase * add light style to iconButton, use in product-switcher * move out of component library * add buttonType input * gate behind sm flag * update aria-label * add role input to bit-menu * style changes * simplify partition logic * split into two components for Storybook * update focus styles; update grid sizing to relative * fix underline on hover * update attribute binding * move to layouts dir * add bitLink; update grid gap * reorder loose components * move orgs mock * move a11y module * fix aria role bug; add aria label to menu * update colors * update ring color * simplify colors * remove duplicate link module
This commit is contained in:
@@ -2,7 +2,7 @@ import { Component, HostBinding, Input } from "@angular/core";
|
||||
|
||||
import { ButtonLikeAbstraction, ButtonType } from "../shared/button-like.abstraction";
|
||||
|
||||
export type IconButtonType = ButtonType | "contrast" | "main" | "muted";
|
||||
export type IconButtonType = ButtonType | "contrast" | "main" | "muted" | "light";
|
||||
|
||||
const focusRing = [
|
||||
// Workaround for box-shadow with transparent offset issue:
|
||||
@@ -99,6 +99,17 @@ const styles: Record<IconButtonType, string[]> = {
|
||||
"disabled:hover:tw-border-danger-500",
|
||||
...focusRing,
|
||||
],
|
||||
light: [
|
||||
"tw-bg-transparent",
|
||||
"!tw-text-alt2",
|
||||
"tw-border-transparent",
|
||||
"hover:tw-bg-transparent-hover",
|
||||
"hover:tw-border-text-alt2",
|
||||
"focus-visible:before:tw-ring-text-alt2",
|
||||
"disabled:hover:tw-border-transparent",
|
||||
"disabled:hover:tw-bg-transparent",
|
||||
...focusRing,
|
||||
],
|
||||
unstyled: [],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user