mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Implement Save without re-prompt and Save as (#1709)
* Implement Save without re-prompt and Save as Fixes #1668 * Add save-as icon * Make .excalidraw the default extension * Only show save as button on supporting browsers
This commit is contained in:
parent
0ed6a96b6a
commit
5d3867d8ac
11 changed files with 74 additions and 26 deletions
|
@ -16,6 +16,7 @@ type ToolButtonBaseProps = {
|
|||
size?: ToolIconSize;
|
||||
keyBindingLabel?: string;
|
||||
showAriaLabel?: boolean;
|
||||
hidden?: boolean;
|
||||
visible?: boolean;
|
||||
selected?: boolean;
|
||||
className?: string;
|
||||
|
@ -44,13 +45,16 @@ export const ToolButton = React.forwardRef((props: ToolButtonProps, ref) => {
|
|||
if (props.type === "button") {
|
||||
return (
|
||||
<button
|
||||
className={`ToolIcon_type_button ToolIcon ${sizeCn}${
|
||||
props.selected ? " ToolIcon--selected" : ""
|
||||
} ${props.className} ${
|
||||
props.visible
|
||||
className={`ToolIcon_type_button ${
|
||||
!props.hidden ? "ToolIcon" : ""
|
||||
} ${sizeCn}${props.selected ? " ToolIcon--selected" : ""} ${
|
||||
props.className
|
||||
} ${
|
||||
props.visible && !props.hidden
|
||||
? "ToolIcon_type_button--show"
|
||||
: "ToolIcon_type_button--hide"
|
||||
}`}
|
||||
hidden={props.hidden}
|
||||
title={props.title}
|
||||
aria-label={props["aria-label"]}
|
||||
type="button"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue