mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
Adding deprecation tags to popover and old modals (#19556)
Co-authored-by: Garrett Bear <gwhisten@gmail.com>
This commit is contained in:
parent
bcfda8b11c
commit
f4f80c223e
@ -3,6 +3,14 @@ import PropTypes from 'prop-types';
|
||||
import classnames from 'classnames';
|
||||
import Button from '../../ui/button';
|
||||
|
||||
/**
|
||||
* @deprecated The `<Modal />` component has been deprecated in favor of the new `<Modal>` component from the component-library.
|
||||
* Please update your code to use the new `<Modal>` component instead, which can be found at ui/components/component-library/modal/modal.tsx.
|
||||
* You can find documentation for the new Modal component in the MetaMask Storybook:
|
||||
* {@link https://metamask.github.io/metamask-storybook/?path=/docs/components-componentlibrary-modal--docs}
|
||||
* If you would like to help with the replacement of the old Modal component, please submit a pull request
|
||||
*/
|
||||
|
||||
export default class Modal extends PureComponent {
|
||||
static propTypes = {
|
||||
children: PropTypes.node,
|
||||
|
@ -444,6 +444,13 @@ function mapDispatchToProps(dispatch) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated The `<Modal />` and the dispatch method of displaying modals has been deprecated in favor of local state and the `<Modal>` component from the component-library.
|
||||
* Please update your code to use the new `<Modal>` component instead, which can be found at ui/components/component-library/modal/modal.tsx.
|
||||
* You can find documentation for the new Modal component in the MetaMask Storybook:
|
||||
* {@link https://metamask.github.io/metamask-storybook/?path=/docs/components-componentlibrary-modal--docs}
|
||||
* If you would like to help with the replacement of the old Modal component, please submit a pull request
|
||||
*/
|
||||
class Modal extends Component {
|
||||
static propTypes = {
|
||||
active: PropTypes.bool.isRequired,
|
||||
|
@ -49,6 +49,15 @@ const defaultFooterProps = {
|
||||
padding: [4, 6, 6],
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated The `<Popover>` component has been deprecated in favor of the new `<Modal>` component from the component-library.
|
||||
* Please update your code to use the new `<Modal>` component instead, which can be found at ui/components/component-library/modal/modal.tsx.
|
||||
* You can find documentation for the new Modal component in the MetaMask Storybook:
|
||||
* {@link https://metamask.github.io/metamask-storybook/?path=/docs/components-componentlibrary-modal--docs}
|
||||
* If you would like to help with the replacement of the old Modal component, please submit a pull request against this GitHub issue:
|
||||
* {@link https://github.com/MetaMask/metamask-extension/issues/19555}
|
||||
*/
|
||||
|
||||
const Popover = ({
|
||||
title,
|
||||
subtitle = '',
|
||||
@ -252,6 +261,14 @@ Popover.propTypes = {
|
||||
footerProps: PropTypes.shape({ ...Box.propTypes }),
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated The `<Popover>` component has been deprecated in favor of the new `<Modal>` component from the component-library.
|
||||
* Please update your code to use the new `<Modal>` component instead, which can be found at ui/components/component-library/modal/modal.tsx.
|
||||
* You can find documentation for the new Modal component in the MetaMask Storybook:
|
||||
* {@link https://metamask.github.io/metamask-storybook/?path=/docs/components-componentlibrary-modal--docs}
|
||||
* If you would like to help with the replacement of the old Modal component, please submit a pull request against this GitHub issue:
|
||||
* {@link https://github.com/MetaMask/metamask-extension/issues/19555}
|
||||
*/
|
||||
export default class PopoverPortal extends PureComponent {
|
||||
static propTypes = Popover.propTypes;
|
||||
|
||||
|
@ -5,7 +5,6 @@ import Popover from './popover.component';
|
||||
|
||||
export default {
|
||||
title: 'Components/UI/Popover',
|
||||
|
||||
component: Popover,
|
||||
argTypes: {
|
||||
title: { control: 'text' },
|
||||
|
Loading…
Reference in New Issue
Block a user