fix remaining eslint error

This commit is contained in:
DaneEveritt 2022-06-26 15:30:05 -04:00
parent dc84af9937
commit 922d75f471
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
15 changed files with 30 additions and 28 deletions

View file

@ -21,11 +21,11 @@ const DialogButtons = ({ children }: { children: React.ReactNode }) => <>{childr
const Dialog = ({ open, title, description, onClose, hideCloseIcon, children }: DialogProps) => {
const items = React.Children.toArray(children || []);
const [buttons, icon, content] = [
// @ts-expect-error
// @ts-expect-error not sure how to get this correct
items.find((child) => child.type === DialogButtons),
// @ts-expect-error
// @ts-expect-error not sure how to get this correct
items.find((child) => child.type === DialogIcon),
// @ts-expect-error
// @ts-expect-error not sure how to get this correct
items.filter((child) => ![DialogIcon, DialogButtons].includes(child.type)),
];