@codecademy/gamut
71.0.071.0.1-alpha.7d89cc.0
dist/AccordionButtonDeprecated/ButtonDeprecated/index.js−
dist/AccordionButtonDeprecated/ButtonDeprecated/index.jsDeleted−65
Index: package/dist/AccordionButtonDeprecated/ButtonDeprecated/index.js
===================================================================
--- package/dist/AccordionButtonDeprecated/ButtonDeprecated/index.js
+++ package/dist/AccordionButtonDeprecated/ButtonDeprecated/index.js
@@ -1,65 +0,0 @@
-/* eslint-disable react/destructuring-assignment */
-import cx from 'classnames';
-import hasIn from 'lodash/hasIn';
-import * as React from 'react';
-import { omitProps } from '../../utils';
-import { ButtonDeprecatedBase } from '../ButtonDeprecatedBase';
-// eslint-disable-next-line gamut/no-css-standalone
-import styles from './styles/index.module.scss';
-
-// themes can be an alias to a color
-// or a unique button type
-import { jsx as _jsx } from "react/jsx-runtime";
-export const buttonPresetThemes = {
- secondary: 'mint',
- platform: 'greyblue',
- lantern: 'darkmint',
- royalblue: 'brand-purple'
-};
-const themes = ['hyper', 'navy', 'red', 'white', 'brand-red', 'brand-yellow', 'brand-purple', 'brand-dark-blue', 'brand-blue', 'mint', 'darkmint', 'grey', 'greyblue'];
-const propKeys = ['theme', 'size', 'outline', 'underline', 'link', 'caps', 'go', 'children', 'block', 'className', 'round', 'square', 'flat', 'fitText', 'onClick'];
-const isPreset = theme => {
- return hasIn(buttonPresetThemes, theme);
-};
-
-/**
- * @deprecated
- * This component is deprecated and is no longer supported.
- *
- * See [FillButon](https://gamut.codecademy.com/storybook/?path=/docs/atoms-button--fill-button#fill-button)
- *
- * @example
- * import { FillButton } fom '@codecademy/gamut';
- *
- * <FillButton variant="primary" />
- */
-
-export const ButtonDeprecated = props => {
- let {
- theme = 'brand-red'
- } = props;
- if (isPreset(theme)) {
- theme = buttonPresetThemes[theme];
- }
- const typeClassName = props.link ? styles.link : styles.btn;
- const themeClassName = props.link ? styles[`link-${theme}`] : styles[`btn-${theme}`];
- const classes = cx(typeClassName, themeClassName, styles[props.size], {
- [styles.block]: props.block,
- [styles.go]: props.go,
- [styles.outline]: props.outline,
- [styles.underline]: props.underline,
- [styles.caps]: props.caps,
- [styles.round]: props.round,
- [styles.square]: props.square,
- [styles.flat]: props.flat,
- [styles['fit-text']]: props.fitText
- }, props.className);
- const propsToTransfer = omitProps(propKeys, props);
- return /*#__PURE__*/_jsx(ButtonDeprecatedBase, {
- ...propsToTransfer,
- className: classes,
- link: props.link,
- onClick: props.onClick,
- children: props.children
- });
-};
\ No newline at end of file