-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
1 parent
c71cde4
commit bdfc783
Showing
7 changed files
with
293 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import React, { useRef } from 'react'; | ||
import { DocSectionCode } from '../../common/docsectioncode'; | ||
import { DocSectionText } from '../../common/docsectiontext'; | ||
import { OverlayPanel } from '../../../lib/overlaypanel/OverlayPanel'; | ||
import { Button } from '../../../lib/button/Button'; | ||
|
||
export function PTDoc(props) { | ||
const op = useRef(null); | ||
|
||
const code = { | ||
basic: ` | ||
<Button type="button" icon="pi pi-image" label="Image" onClick={(e) => op.current.toggle(e)} /> | ||
<OverlayPanel ref={op} | ||
pt={{ | ||
root: { className: 'surface-ground' } | ||
}} | ||
> | ||
<img src="https://primefaces.org/cdn/primevue/images/product/bamboo-watch.jpg" alt="Bamboo Watch" /> | ||
</OverlayPanel> | ||
`, | ||
javascript: ` | ||
import React, { useRef } from 'react'; | ||
import { OverlayPanel } from 'primereact/overlaypanel'; | ||
export default function PTDemo() { | ||
const op = useRef(null); | ||
return ( | ||
<div className="card flex justify-content-center"> | ||
<Button type="button" icon="pi pi-image" label="Image" onClick={(e) => op.current.toggle(e)} /> | ||
<OverlayPanel ref={op} | ||
pt={{ | ||
root: { className: 'surface-ground' } | ||
}} | ||
> | ||
<img src="https://primefaces.org/cdn/primevue/images/product/bamboo-watch.jpg" alt="Bamboo Watch" /> | ||
</OverlayPanel> | ||
</div> | ||
); | ||
} | ||
`, | ||
typescript: ` | ||
import React, { useRef } from 'react'; | ||
import { OverlayPanel } from 'primereact/overlaypanel'; | ||
export default function PTDemo() { | ||
const op = useRef(null); | ||
return ( | ||
<div className="card flex justify-content-center"> | ||
<Button type="button" icon="pi pi-image" label="Image" onClick={(e) => op.current.toggle(e)} /> | ||
<OverlayPanel ref={op} | ||
pt={{ | ||
root: { className: 'surface-ground' } | ||
}} | ||
> | ||
<img src="https://primefaces.org/cdn/primevue/images/product/bamboo-watch.jpg" alt="Bamboo Watch" /> | ||
</OverlayPanel> | ||
</div> | ||
); | ||
} | ||
` | ||
}; | ||
|
||
return ( | ||
<> | ||
<DocSectionText {...props}></DocSectionText> | ||
<div className="card flex justify-content-center"> | ||
<Button type="button" icon="pi pi-image" label="Image" onClick={(e) => op.current.toggle(e)} /> | ||
|
||
<OverlayPanel ref={op} | ||
pt={{ | ||
root: { className: 'surface-ground' } | ||
}} | ||
> | ||
<img src="https://primefaces.org/cdn/primevue/images/product/bamboo-watch.jpg" alt="Bamboo Watch" /> | ||
</OverlayPanel> | ||
</div> | ||
<DocSectionCode code={code} /> | ||
</> | ||
); | ||
} |
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,13 @@ | ||
import React from 'react'; | ||
import { DocSectionText } from '../../common/docsectiontext'; | ||
|
||
export const Wireframe = (props) => { | ||
return ( | ||
<> | ||
<DocSectionText {...props} /> | ||
<div> | ||
<img className="w-full" src="/images/pt/wireframe-placeholder.jpg" alt="card" /> | ||
</div> | ||
</> | ||
); | ||
}; |
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
Oops, something went wrong.