-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from sonatype/Feature-Breaking-Changes-v2
Version 2 feature branch
- Loading branch information
Showing
135 changed files
with
2,774 additions
and
1,723 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (c) 2019-present Sonatype, Inc. | ||
* This program and the accompanying materials are made available under | ||
* the terms of the Eclipse Public License 2.0 which accompanies this | ||
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/. | ||
*/ | ||
import React, {useState} from 'react'; | ||
|
||
import {NxModal, NxFontAwesomeIcon, NxButton} from '@sonatype/react-shared-components'; | ||
import {faAngry} from '@fortawesome/free-solid-svg-icons'; | ||
|
||
export default function NxModalSimpleExample() { | ||
const [showModal, setShowModal] = useState(false); | ||
const modalCloseHandler = () => setShowModal(false); | ||
|
||
return ( | ||
<> | ||
<NxButton onClick={() => setShowModal(true)}>Open Modal</NxButton> | ||
{ showModal && | ||
<NxModal variant="narrow" id="nx-modal-narrow-example" onClose={modalCloseHandler}> | ||
<header className="nx-modal-header"> | ||
<h2 className="nx-h2"> | ||
<NxFontAwesomeIcon icon={faAngry} /> | ||
<span> | ||
Example NxModal header - this header is long to demonstrate the truncation that all modal headers | ||
can do | ||
</span> | ||
</h2> | ||
</header> | ||
<div className="nx-modal-content"> | ||
<p className="nx-p">This is some content inside a narrower modal.</p> | ||
</div> | ||
<footer className="nx-footer"> | ||
<div className="nx-btn-bar"> | ||
<NxButton onClick={modalCloseHandler}>Close</NxButton> | ||
</div> | ||
</footer> | ||
</NxModal> | ||
} | ||
</> | ||
); | ||
}; |
Oops, something went wrong.