Skip to content

Commit 7b67549

Browse files
committed
ButtonOrLink: update to named export
1 parent bc82be5 commit 7b67549

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

client/common/ButtonOrLink.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { render, screen, fireEvent, waitFor, history } from '../test-utils';
3-
import ButtonOrLink from './ButtonOrLink';
3+
import { ButtonOrLink } from './ButtonOrLink';
44

55
describe('ButtonOrLink', () => {
66
const clickHandler = jest.fn();

client/common/ButtonOrLink.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export type Ref = HTMLAnchorElement | HTMLButtonElement;
2828
* - Internal links will use react-router.
2929
* - External links should start with 'http' or 'https' and will open in a new window.
3030
*/
31-
const ButtonOrLink = React.forwardRef(
31+
export const ButtonOrLink = React.forwardRef(
3232
(
3333
{
3434
href,
@@ -92,5 +92,3 @@ const ButtonOrLink = React.forwardRef(
9292
);
9393
}
9494
);
95-
96-
export default ButtonOrLink;

client/components/Dropdown/MenuItem.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PropTypes from 'prop-types';
22
import React from 'react';
3-
import ButtonOrLink from '../../common/ButtonOrLink';
3+
import { ButtonOrLink } from '../../common/ButtonOrLink';
44

55
// TODO: combine with NavMenuItem
66

client/components/Menubar/MenubarItem.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import PropTypes from 'prop-types';
22
import React, { useEffect, useContext, useRef } from 'react';
33
import { MenubarContext, SubmenuContext, ParentMenuContext } from './contexts';
4-
import ButtonOrLink from '../../common/ButtonOrLink';
4+
import { ButtonOrLink } from '../../common/ButtonOrLink';
55

66
/**
77
* MenubarItem wraps a button or link in an accessible list item that

client/modules/IDE/components/Header/MobileNav.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import classNames from 'classnames';
88
import { ParentMenuContext } from '../../../../components/Menubar/contexts';
99
import Menubar from '../../../../components/Menubar/Menubar';
1010
import { useMenuProps } from '../../../../components/Menubar/MenubarSubmenu';
11-
import ButtonOrLink from '../../../../common/ButtonOrLink';
11+
import { ButtonOrLink } from '../../../../common/ButtonOrLink';
1212
import { prop, remSize } from '../../../../theme';
1313
import AsteriskIcon from '../../../../images/p5-asterisk.svg';
1414
import IconButton from '../../../../common/IconButton';

0 commit comments

Comments
 (0)