From d24f393ac71f3babadaac5aaf928f102d66a9c37 Mon Sep 17 00:00:00 2001 From: Petro Silenius Date: Mon, 31 Oct 2022 22:21:44 +0200 Subject: [PATCH] Spread props to multiple rows to fix prettier error --- examples/nextjs-with-typescript/src/Link.tsx | 23 ++++++++++++++++++-- examples/nextjs/src/Link.js | 23 ++++++++++++++++++-- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/examples/nextjs-with-typescript/src/Link.tsx b/examples/nextjs-with-typescript/src/Link.tsx index 12b919c429125f..c46e023517272b 100644 --- a/examples/nextjs-with-typescript/src/Link.tsx +++ b/examples/nextjs-with-typescript/src/Link.tsx @@ -17,7 +17,17 @@ interface NextLinkComposedProps export const NextLinkComposed = React.forwardRef( function NextLinkComposed(props, ref) { - const { to, linkAs, replace, scroll, shallow, prefetch, legacyBehavior = true, locale, ...other } = props; + const { + to, + linkAs, + replace, + scroll, + shallow, + prefetch, + legacyBehavior = true, + locale, + ...other + } = props; return ( (function Link(props, } const linkAs = linkAsProp || as; - const nextjsProps = { to: href, linkAs, replace, scroll, shallow, prefetch,legacyBehavior, locale }; + const nextjsProps = { + to: href, + linkAs, + replace, + scroll, + shallow, + prefetch, + legacyBehavior, + locale, + }; if (noLinkStyle) { return ; diff --git a/examples/nextjs/src/Link.js b/examples/nextjs/src/Link.js index 03623fd1feaa03..0d0eba9cdb0eef 100644 --- a/examples/nextjs/src/Link.js +++ b/examples/nextjs/src/Link.js @@ -10,7 +10,17 @@ import { styled } from '@mui/material/styles'; const Anchor = styled('a')({}); export const NextLinkComposed = React.forwardRef(function NextLinkComposed(props, ref) { - const { to, linkAs, replace, scroll, shallow, prefetch, legacyBehavior = true, locale, ...other } = props; + const { + to, + linkAs, + replace, + scroll, + shallow, + prefetch, + legacyBehavior = true, + locale, + ...other + } = props; return ( ;