Skip to content

Commit

Permalink
CheckBox: Use constant object for InkRiple config instead of function (
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-simionov authored Jul 28, 2020
1 parent ddc6808 commit 18ded75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/renovation/ui/check_box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ const getCssClasses = (model: CheckBoxProps): string => {
return combineClasses(classesMap);
};

const inkRippleConfig = (): InkRippleConfig => ({
const inkRippleConfig: InkRippleConfig = {
waveSizeCoefficient: 2.5,
useHoldAnimation: false,
wavesNumber: 2,
isCentered: true,
});
};

export const viewFunction = (viewModel: CheckBox): JSX.Element => {
const { text, name } = viewModel.props;
Expand Down Expand Up @@ -82,7 +82,7 @@ export const viewFunction = (viewModel: CheckBox): JSX.Element => {
{text && (<span className="dx-checkbox-text">{text}</span>)}
</div>
{viewModel.props.useInkRipple
&& <InkRipple config={inkRippleConfig()} ref={viewModel.inkRippleRef} />}
&& <InkRipple config={inkRippleConfig} ref={viewModel.inkRippleRef} />}
</Widget>
);
};
Expand Down

0 comments on commit 18ded75

Please sign in to comment.