-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
765 additions
and
719 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
MDB 5 React | ||
|
||
Version: FREE 7.1.0 | ||
Version: FREE 7.2.0 | ||
|
||
Documentation: | ||
https://mdbootstrap.com/docs/b5/react/ | ||
|
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 |
---|---|---|
@@ -1,50 +1,25 @@ | ||
import React from "react"; | ||
import { | ||
MDBDropdown, | ||
MDBDropdownMenu, | ||
MDBDropdownToggle, | ||
MDBDropdownItem, | ||
} from "mdb-react-ui-kit"; | ||
import { MDBBtn, MDBContainer } from "mdb-react-ui-kit"; | ||
|
||
export default function App() { | ||
function App() { | ||
return ( | ||
<div className="container"> | ||
<div | ||
className="d-flex justify-content-center align-items-center" | ||
style={{ height: "100vh" }} | ||
> | ||
<MDBContainer fluid> | ||
<div className="d-flex justify-content-center align-items-center" style={{ height: "100vh" }}> | ||
<div className="text-center"> | ||
<img | ||
className="mb-4" | ||
src="https://v1.mdbootstrap.com/wp-content/uploads/2022/11/mdb-sale.png" | ||
src="https://mdbootstrap.com/img/logo/mdb-transparent-250px.png" | ||
style={{ width: 250, height: 90 }} | ||
/> | ||
<h5 className="mb-4"> | ||
Only now, you can get all premium features & more with the best | ||
discounts of the year. | ||
</h5> | ||
<p className="mb-4 fw-bold">All offers are LIMITED!</p> | ||
<a | ||
className="btn btn-lg btn-danger fw-bold mb-3" | ||
style={{ backgroundColor: "#e70808" }} | ||
href="https://mdbootstrap.com/sale/november/" | ||
target="_blank" | ||
role="button" | ||
> | ||
Check insane offers | ||
</a> | ||
<hr /> | ||
<p className="mt-4 lead fw-bold"> | ||
Publish your project with a single command. | ||
</p> | ||
<p className="mt-2"> | ||
Use{" "} | ||
<a href="https://mdbgo.com/" className="fw-bold" target="_blank"> | ||
<u>MDB GO</u> | ||
</a>{" "} | ||
for a free hosting & deployment tool | ||
</p> | ||
<h5 className="mb-3">Thank you for using our product. We're glad you're with us.</h5> | ||
<p className="mb-3">MDB Team</p> | ||
<MDBBtn tag="a" href="https://mdbootstrap.com/docs/react/" target="_blank" role="button"> | ||
MDB REACT DOCS | ||
</MDBBtn> | ||
</div> | ||
</div> | ||
</div> | ||
</MDBContainer> | ||
); | ||
} | ||
|
||
export default App; |
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,34 @@ | ||
import React, { useState, useEffect, RefObject } from 'react'; | ||
import { createPortal } from 'react-dom'; | ||
|
||
type PortalTypes = { | ||
children: React.ReactNode; | ||
/** | ||
* The reference to the container element where the elements will be rendered. If not specified the element will be rendered in the document body. | ||
* */ | ||
containerRef?: RefObject<HTMLElement>; | ||
/** | ||
* When `true` children will be rendered in normal DOM hierarchy. | ||
* @default false | ||
* */ | ||
disablePortal?: boolean; | ||
}; | ||
|
||
/** | ||
* Renders elements outside the component's normal DOM hierarchy. | ||
*/ | ||
const Portal = ({ children, containerRef, disablePortal }: PortalTypes) => { | ||
const [mounted, setMounted] = useState(false); | ||
|
||
useEffect(() => { | ||
!disablePortal && setMounted(true); | ||
}, [disablePortal]); | ||
|
||
if (disablePortal) { | ||
return <>{children}</>; | ||
} | ||
|
||
return mounted ? createPortal(<>{children}</>, containerRef?.current || document.body) : null; | ||
}; | ||
|
||
export default Portal; |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.