mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Using dropdown icon instead of sandwich
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
44560093dc
commit
453f9926c8
@ -28,6 +28,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.warningHigh {
|
.warningHigh {
|
||||||
--active-color-hsl: 0deg 76% 62%;
|
--active-color-hsl: 0deg 76% 62%;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,8 @@ import { Menu, MenuItem } from "../menu";
|
|||||||
import uniqueId from "lodash/uniqueId";
|
import uniqueId from "lodash/uniqueId";
|
||||||
import { noop } from "lodash";
|
import { noop } from "lodash";
|
||||||
import { cssNames } from "../../utils";
|
import { cssNames } from "../../utils";
|
||||||
|
import type { IconProps } from "../icon";
|
||||||
|
import { Icon } from "../icon";
|
||||||
|
|
||||||
interface UpdateButtonProps {
|
interface UpdateButtonProps {
|
||||||
warningLevel?: "light" | "medium" | "high";
|
warningLevel?: "light" | "medium" | "high";
|
||||||
@ -18,6 +20,7 @@ interface UpdateButtonProps {
|
|||||||
|
|
||||||
export function UpdateButton({ warningLevel, update }: UpdateButtonProps) {
|
export function UpdateButton({ warningLevel, update }: UpdateButtonProps) {
|
||||||
const id = uniqueId("update_button_");
|
const id = uniqueId("update_button_");
|
||||||
|
const menuIconProps: IconProps = { material: "update", small: true };
|
||||||
const [opened, setOpened] = useState(false);
|
const [opened, setOpened] = useState(false);
|
||||||
|
|
||||||
const onKeyDown = (evt: React.KeyboardEvent<HTMLButtonElement>) => {
|
const onKeyDown = (evt: React.KeyboardEvent<HTMLButtonElement>) => {
|
||||||
@ -48,11 +51,7 @@ export function UpdateButton({ warningLevel, update }: UpdateButtonProps) {
|
|||||||
onKeyDown={onKeyDown}
|
onKeyDown={onKeyDown}
|
||||||
>
|
>
|
||||||
Update
|
Update
|
||||||
<svg width="12" height="12" viewBox="0 0 12 12" shapeRendering="crispEdges">
|
<Icon material="arrow_drop_down" className={styles.icon}/>
|
||||||
<path fill="currentColor" d="M0,8.5h12v1H0V8.5z"/>
|
|
||||||
<path fill="currentColor" d="M0,5.5h12v1H0V5.5z"/>
|
|
||||||
<path fill="currentColor" d="M0,2.5h12v1H0V2.5z"/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
</button>
|
||||||
<Menu
|
<Menu
|
||||||
usePortal
|
usePortal
|
||||||
@ -61,7 +60,7 @@ export function UpdateButton({ warningLevel, update }: UpdateButtonProps) {
|
|||||||
close={toggle}
|
close={toggle}
|
||||||
open={noop}
|
open={noop}
|
||||||
>
|
>
|
||||||
<MenuItem icon="update" onClick={update} data-testid="update-lens-menu-item">
|
<MenuItem icon={menuIconProps} onClick={update} data-testid="update-lens-menu-item">
|
||||||
Relaunch to Update Lens
|
Relaunch to Update Lens
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user