Skip to content

Commit

Permalink
[OSCI] Docs/modal width (opensearch-project#1066)
Browse files Browse the repository at this point in the history
* Removing the 'Widths' section from the OuiModal docs

Signed-off-by: Samuel Valdes Gutierrez <valdesgutierrez@gmail.com>

* Removing the 'Widths' section from the OuiModal docs

Signed-off-by: Samuel Valdes Gutierrez <valdesgutierrez@gmail.com>

* updating CHANGELOG.md file

Signed-off-by: Samuel Valdes Gutierrez <valdesgutierrez@gmail.com>

* removing file modal_width.js

Signed-off-by: Samuel Valdes Gutierrez <valdesgutierrez@gmail.com>

---------

Signed-off-by: Samuel Valdes Gutierrez <valdesgutierrez@gmail.com>
  • Loading branch information
BigSamu authored Oct 12, 2023
1 parent f65ea67 commit f9c7474
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 123 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
44 changes: 0 additions & 44 deletions src-docs/src/views/modal/modal_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = `<OuiModal onClose={closeModal}>
<OuiModalHeader>
<OuiModalHeaderTitle><h1><!-- Modal title --></h1></OuiModalHeaderTitle>
Expand All @@ -55,20 +52,6 @@ const modalSnippet = `<OuiModal onClose={closeModal}>
</OuiModalFooter>
</OuiModal>`;

const modalWidthSnippet = `<OuiModal style={{ width: 800 }} onClose={closeModal}>
<OuiModalHeader>
<OuiModalHeaderTitle><h1><!-- Modal title --></h1></OuiModalHeaderTitle>
</OuiModalHeader>
<OuiModalBody>
<!-- Modal body -->
</OuiModalBody>
<OuiModalFooter>
<OuiButton onClick={closeModal} fill>Close</OuiButton>
</OuiModalFooter>
</OuiModal>`;

const modalFormSnippet = `<OuiModal onClose={closeModal}>
<OuiModalHeader>
<OuiModalHeaderTitle><h1><!-- Modal title --></h1></OuiModalHeaderTitle>
Expand Down Expand Up @@ -243,32 +226,5 @@ export const ModalExample = {
snippet: confirmModalLoadingSnippet,
demo: <ConfirmLoadingModal />,
},
{
title: 'Widths',
source: [
{
type: GuideSectionTypes.JS,
code: modalWidthSource,
},
],
text: (
<>
<p>
Modals start with a minimum width of <OuiCode>400px</OuiCode>, just
enough to display form rows. They will grow to fit the contents
until it reaches the specified <OuiCode>maxWidth</OuiCode>, the
default of which is set to the medium breakpoint.
</p>
<p>
If the modal is not growing wide enough to fit your contents, you
can pass a specific <OuiCode>style.width</OuiCode>, just remember
that modals will always shrink to fit the window width.
</p>
</>
),
props: { OuiModal },
snippet: modalWidthSnippet,
demo: <ModalWidth />,
},
],
};
79 changes: 0 additions & 79 deletions src-docs/src/views/modal/modal_width.js

This file was deleted.

0 comments on commit f9c7474

Please sign in to comment.