@codecademy/gamut
71.0.071.0.1-alpha.d92614.0
dist/AccordionButtonDeprecated/ButtonDeprecatedBase/index.js−
dist/AccordionButtonDeprecated/ButtonDeprecatedBase/index.jsDeleted−71
Index: package/dist/AccordionButtonDeprecated/ButtonDeprecatedBase/index.js
===================================================================
--- package/dist/AccordionButtonDeprecated/ButtonDeprecatedBase/index.js
+++ package/dist/AccordionButtonDeprecated/ButtonDeprecatedBase/index.js
@@ -1,71 +0,0 @@
-import cx from 'classnames';
-import * as React from 'react';
-import { omitProps } from '../../utils';
-// eslint-disable-next-line gamut/no-css-standalone
-import styles from './styles.module.scss';
-import { jsx as _jsx } from "react/jsx-runtime";
-const propKeys = ['children', 'className', 'href', 'link', 'onClick', 'target', 'rel'];
-/**
- * @deprecated
- * This component is deprecated and is no longer supported.
- *
- * See [Anchor](https://gamut.codecademy.com/storybook/?path=/docs/typography-anchor--anchor) for similiar functionality
- *
- * @example
- * import { Anchor } from '@codecademy/gamut';
- *
- * <Anchor variant="interface">Button</Anchor>
- *
- */
-
-export const ButtonDeprecatedBase = props => {
- const {
- href,
- className,
- link,
- onClick,
- target,
- rel
- } = props;
- const {
- as: As,
- asProps = {},
- ...restOfProps
- } = props;
- const propsToTransfer = omitProps(propKeys, restOfProps);
- const classes = cx(styles.basicBtn, className, {
- [styles.basicLink]: link
- });
- const defaultProps = {
- ...propsToTransfer,
- className: classes,
- onClick,
- 'data-btn': true
- };
- if (As) {
- return /*#__PURE__*/_jsx(As, {
- ...defaultProps,
- ...asProps
- });
- }
- if (href) {
- // Check if this is a popup and and appropriate rel props if they don't exist (see https://web.dev/external-anchors-use-rel-noopener/)
- const anchorProps = {
- target,
- rel: target === '_blank' && !rel ? 'noopener noreferrer' : rel
- };
-
- // Anchor tag receives children content from propsToTransfer
- // eslint-disable-next-line jsx-a11y/anchor-has-content
- return /*#__PURE__*/_jsx("a", {
- ...defaultProps,
- ...anchorProps,
- href: href
- });
- }
-
- // eslint-disable-next-line react/button-has-type
- return /*#__PURE__*/_jsx("button", {
- ...defaultProps
- });
-};
\ No newline at end of file