Action buttons consistency and tooltips
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
e8c18ebc5e
commit
cc72d031b5
@@ -84,17 +84,21 @@ function NamedRangeActive(properties: NamedRangeProperties) {
|
|||||||
onClick={(event) => event.stopPropagation()}
|
onClick={(event) => event.stopPropagation()}
|
||||||
/>
|
/>
|
||||||
<IconsWrapper>
|
<IconsWrapper>
|
||||||
<IconButton
|
<StyledIconButton
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const error = onSave(name, scope, formula);
|
const error = onSave(name, scope, formula);
|
||||||
if (error) {
|
if (error) {
|
||||||
setFormulaError(true);
|
setFormulaError(true);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
title={t("name_manager_dialog.apply")}
|
||||||
>
|
>
|
||||||
<StyledCheck size={16} />
|
<StyledCheck size={16} />
|
||||||
</IconButton>
|
</StyledIconButton>
|
||||||
<StyledIconButton onClick={onCancel}>
|
<StyledIconButton
|
||||||
|
onClick={onCancel}
|
||||||
|
title={t("name_manager_dialog.discard")}
|
||||||
|
>
|
||||||
<X size={16} />
|
<X size={16} />
|
||||||
</StyledIconButton>
|
</StyledIconButton>
|
||||||
</IconsWrapper>
|
</IconsWrapper>
|
||||||
@@ -141,6 +145,10 @@ const StyledTextField = styled(TextField)(() => ({
|
|||||||
|
|
||||||
const StyledIconButton = styled(IconButton)(({ theme }) => ({
|
const StyledIconButton = styled(IconButton)(({ theme }) => ({
|
||||||
color: theme.palette.error.main,
|
color: theme.palette.error.main,
|
||||||
|
borderRadius: "8px",
|
||||||
|
"&:hover": {
|
||||||
|
backgroundColor: theme.palette.grey["50"],
|
||||||
|
},
|
||||||
"&.Mui-disabled": {
|
"&.Mui-disabled": {
|
||||||
opacity: 0.6,
|
opacity: 0.6,
|
||||||
color: theme.palette.error.light,
|
color: theme.palette.error.light,
|
||||||
|
|||||||
@@ -28,10 +28,18 @@ function NamedRangeInactive(properties: NamedRangeInactiveProperties) {
|
|||||||
<StyledDiv>{scopeName}</StyledDiv>
|
<StyledDiv>{scopeName}</StyledDiv>
|
||||||
<StyledDiv>{formula}</StyledDiv>
|
<StyledDiv>{formula}</StyledDiv>
|
||||||
<IconsWrapper>
|
<IconsWrapper>
|
||||||
<StyledIconButtonBlack onClick={onEdit} disabled={!showOptions}>
|
<StyledIconButtonBlack
|
||||||
|
onClick={onEdit}
|
||||||
|
disabled={!showOptions}
|
||||||
|
title={t("name_manager_dialog.edit")}
|
||||||
|
>
|
||||||
<PencilLine size={16} />
|
<PencilLine size={16} />
|
||||||
</StyledIconButtonBlack>
|
</StyledIconButtonBlack>
|
||||||
<StyledIconButtonRed onClick={onDelete} disabled={!showOptions}>
|
<StyledIconButtonRed
|
||||||
|
onClick={onDelete}
|
||||||
|
disabled={!showOptions}
|
||||||
|
title={t("name_manager_dialog.delete")}
|
||||||
|
>
|
||||||
<Trash2 size={16} />
|
<Trash2 size={16} />
|
||||||
</StyledIconButtonRed>
|
</StyledIconButtonRed>
|
||||||
</IconsWrapper>
|
</IconsWrapper>
|
||||||
@@ -43,10 +51,18 @@ function NamedRangeInactive(properties: NamedRangeInactiveProperties) {
|
|||||||
|
|
||||||
const StyledIconButtonBlack = styled(IconButton)(({ theme }) => ({
|
const StyledIconButtonBlack = styled(IconButton)(({ theme }) => ({
|
||||||
color: theme.palette.common.black,
|
color: theme.palette.common.black,
|
||||||
|
borderRadius: "8px",
|
||||||
|
"&:hover": {
|
||||||
|
backgroundColor: theme.palette.grey["50"],
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledIconButtonRed = styled(IconButton)(({ theme }) => ({
|
const StyledIconButtonRed = styled(IconButton)(({ theme }) => ({
|
||||||
color: theme.palette.error.main,
|
color: theme.palette.error.main,
|
||||||
|
borderRadius: "8px",
|
||||||
|
"&:hover": {
|
||||||
|
backgroundColor: theme.palette.grey["50"],
|
||||||
|
},
|
||||||
"&.Mui-disabled": {
|
"&.Mui-disabled": {
|
||||||
opacity: 0.6,
|
opacity: 0.6,
|
||||||
color: theme.palette.error.light,
|
color: theme.palette.error.light,
|
||||||
|
|||||||
@@ -85,6 +85,11 @@
|
|||||||
"help": "Learn more about Named Ranges",
|
"help": "Learn more about Named Ranges",
|
||||||
"new": "Add new",
|
"new": "Add new",
|
||||||
"workbook": "Workbook",
|
"workbook": "Workbook",
|
||||||
"global": "(Global)"
|
"global": "(Global)",
|
||||||
|
"close": "Close dialog",
|
||||||
|
"delete": "Delete Range",
|
||||||
|
"edit": "Edit Range",
|
||||||
|
"apply": "Apply changes",
|
||||||
|
"discard": "Discard changes"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user