Performance cleanup; check main box when all children are checked; closes #2379

This commit is contained in:
Dane Everitt 2020-09-22 21:41:35 -07:00
parent 2182a15494
commit cbedd4539c
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 107 additions and 76 deletions

View file

@ -1,7 +1,8 @@
import React from 'react';
import React, { memo } from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { IconProp } from '@fortawesome/fontawesome-svg-core';
import tw from 'twin.macro';
import isEqual from 'react-fast-compare';
interface Props {
icon?: IconProp;
@ -27,4 +28,4 @@ const TitledGreyBox = ({ icon, title, children, className }: Props) => (
</div>
);
export default TitledGreyBox;
export default memo(TitledGreyBox, isEqual);