Skip to content

Commit

Permalink
Merge pull request #2042 from woocommerce/dev/1833-externalize-menu-d…
Browse files Browse the repository at this point in the history
…ropdown-modal

Externalize `NavigableMenu`, `Dropdown` and `Modal` components imported from `@wordpress/components`
  • Loading branch information
eason9487 authored Aug 9, 2023
2 parents ebca4f5 + de3a889 commit 757ed21
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 28 deletions.
2 changes: 1 addition & 1 deletion js/src/components/app-modal/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { Modal } from '@wordpress/components';
import { Modal } from 'extracted/@wordpress/components';
import classnames from 'classnames';

/**
Expand Down
2 changes: 1 addition & 1 deletion js/src/components/app-sub-nav/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { Fragment } from '@wordpress/element';
import { NavigableMenu } from '@wordpress/components';
import { NavigableMenu } from 'extracted/@wordpress/components';
import { Link } from '@woocommerce/components';
import classnames from 'classnames';

Expand Down
2 changes: 1 addition & 1 deletion js/src/components/app-tab-nav/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { NavigableMenu } from '@wordpress/components';
import { NavigableMenu } from 'extracted/@wordpress/components';
import { Link } from '@woocommerce/components';
import classnames from 'classnames';

Expand Down
21 changes: 0 additions & 21 deletions js/src/css/shared/_gutenberg-components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,3 @@
.components-input-control__suffix {
margin-right: $grid-unit;
}

// Hack to fix the Tooltip position of the top-right side close button in a Modal component.
// The follow up can be found here: https://github.com/woocommerce/google-listings-and-ads/issues/203
.components-modal {
&__screen-overlay {
display: flex;
justify-content: center;
align-items: center;
}

&__frame {
@include break-small {
transform: initial;
position: relative;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { Dropdown } from '@wordpress/components';
import { Button } from 'extracted/@wordpress/components';
import { Dropdown, Button } from 'extracted/@wordpress/components';
import { focus } from '@wordpress/dom';
import classnames from 'classnames';
import { Component } from '@wordpress/element';
Expand Down
7 changes: 5 additions & 2 deletions js/src/external-components/wordpress/guide/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
import classnames from 'classnames';
import { useState } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { Modal } from '@wordpress/components';
import { Button, KeyboardShortcuts } from 'extracted/@wordpress/components';
import {
Modal,
Button,
KeyboardShortcuts,
} from 'extracted/@wordpress/components';

/**
* Internal dependencies
Expand Down

0 comments on commit 757ed21

Please sign in to comment.