Skip to content

Commit

Permalink
add reset button for VariableExpressionParameterEditor (#1140)
Browse files Browse the repository at this point in the history
  • Loading branch information
gayathrir11 authored May 6, 2022
1 parent 7431693 commit d59c216
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changeset/dry-colts-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
"@finos/legend-query": patch
---
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const VariableExpressionParameterEditor = observer(
className?: string | undefined;
resetValue: () => void;
}) => {
const { valueSpecification, className } = props;
const { valueSpecification, className, resetValue } = props;
const varName = valueSpecification.name;
return (
<div
Expand All @@ -153,6 +153,13 @@ const VariableExpressionParameterEditor = observer(
<InfoCircleIcon />
</div>
</QueryBuilderParameterInfoTooltip>
<button
className="query-builder-value-spec-editor__parameter__reset-btn"
title="Reset"
onClick={resetValue}
>
<RefreshIcon />
</button>
</div>
</div>
);
Expand Down
10 changes: 10 additions & 0 deletions packages/legend-query/style/_query-builder.scss
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,16 @@
height: 2rem;
width: 2rem;
}

&__reset-btn {
@include flexVCenter;

height: 2rem;
width: 2rem;
font-size: 2rem;
color: var(--color-light-grey-300);
font-weight: 700;
}
}

&__input {
Expand Down

0 comments on commit d59c216

Please sign in to comment.