Skip to content

Commit

Permalink
fix(react): remove line breaks in link.ts warn, fixes minified bundle…
Browse files Browse the repository at this point in the history
… mess
  • Loading branch information
jrson83 committed Apr 18, 2024
1 parent 3184668 commit b0d20f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/Link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const Link = forwardRef<unknown, InertiaLinkProps>(

if (as === 'a' && method !== 'get') {
console.warn(
`Creating POST/PUT/PATCH/DELETE <a> links is discouraged as it causes "Open Link in New Tab/Window" accessibility issues.\n\nPlease specify a more appropriate element using the "as" attribute. For example:\n\n<Link href="${href}" method="${method}" as="button">...</Link>`
`Creating POST/PUT/PATCH/DELETE <a> links is discouraged as it causes "Open Link in New Tab/Window" accessibility issues. Please specify a more appropriate element using the "as" attribute. For example: <Link href="${href}" method="${method}" as="button">...</Link>`
)
}

Expand Down

0 comments on commit b0d20f9

Please sign in to comment.