diff --git a/CHANGELOG.md b/CHANGELOG.md index a9ac2f5e8f..f42e01d8ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - Update default docsite theme to Next Dark ([#1029](https://github.com/opensearch-project/oui/pull/1029)) - Fix next light color guidelines ([#1030](https://github.com/opensearch-project/oui/pull/1030)) - Update docsite version selector to use OUI components ([#1028](https://github.com/opensearch-project/oui/pull/1028)) +- Remove "Widths" section from the OuiModal docs ([#1066](https://github.com/opensearch-project/oui/pull/1066)) ### 🛠 Maintenance diff --git a/src-docs/src/views/modal/modal_example.js b/src-docs/src/views/modal/modal_example.js index 3be6b6d439..767d838815 100644 --- a/src-docs/src/views/modal/modal_example.js +++ b/src-docs/src/views/modal/modal_example.js @@ -38,9 +38,6 @@ const confirmModalSource = require('!!raw-loader!./confirm_modal'); import ConfirmLoadingModal from './confirm_modal_loading'; const confirmModalLoadingSource = require('!!raw-loader!./confirm_modal_loading'); -import ModalWidth from './modal_width'; -const modalWidthSource = require('!!raw-loader!./modal_width'); - const modalSnippet = `

@@ -55,20 +52,6 @@ const modalSnippet = ` `; -const modalWidthSnippet = ` - -

-
- - - - - - - Close - -
`; - const modalFormSnippet = `

@@ -243,32 +226,5 @@ export const ModalExample = { snippet: confirmModalLoadingSnippet, demo: , }, - { - title: 'Widths', - source: [ - { - type: GuideSectionTypes.JS, - code: modalWidthSource, - }, - ], - text: ( - <> -

- Modals start with a minimum width of 400px, just - enough to display form rows. They will grow to fit the contents - until it reaches the specified maxWidth, the - default of which is set to the medium breakpoint. -

-

- If the modal is not growing wide enough to fit your contents, you - can pass a specific style.width, just remember - that modals will always shrink to fit the window width. -

- - ), - props: { OuiModal }, - snippet: modalWidthSnippet, - demo: , - }, ], }; diff --git a/src-docs/src/views/modal/modal_width.js b/src-docs/src/views/modal/modal_width.js deleted file mode 100644 index 188868da34..0000000000 --- a/src-docs/src/views/modal/modal_width.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -import React, { useState } from 'react'; - -import { - OuiButton, - OuiModal, - OuiModalBody, - OuiModalFooter, - OuiModalHeader, - OuiModalHeaderTitle, - OuiCodeBlock, -} from '../../../../src/components'; -import { OuiSpacer } from '../../../../src/components/spacer'; - -export default () => { - const [isModalVisible, setIsModalVisible] = useState(false); - - const closeModal = () => setIsModalVisible(false); - const showModal = () => setIsModalVisible(true); - - let modal; - - if (isModalVisible) { - modal = ( - - - -

Modal title

-
-
- - - This modal has the following setup: - - - {` - -

-
- - - - - - - - Close - - -
`} -
-
- - - - Close - - -
- ); - } - - return ( -
- Show modal with custom width - {modal} -
- ); -};