-
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
9c15d22
commit 1f90cc0
Showing
7 changed files
with
370 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,102 @@ | ||
import React, { useState } from 'react'; | ||
import { DocSectionCode } from '../../common/docsectioncode'; | ||
import { DocSectionText } from '../../common/docsectiontext'; | ||
import { Sidebar } from '../../../lib/sidebar/Sidebar'; | ||
import { Button } from '../../../lib/button/Button'; | ||
|
||
export function PTDoc(props) { | ||
const [visible, setVisible] = useState(false); | ||
const code = { | ||
basic: ` | ||
<Terminal | ||
welcomeMessage="Welcome to PrimeReact" | ||
prompt="primereact $" | ||
pt={{ | ||
root: { className: 'surface-900 text-white' }, | ||
command: { className: 'text-blue-500' }, | ||
prompt: { className: 'text-yellow-500' }, | ||
response: { className: 'text-purple-500' } | ||
}} | ||
/> | ||
`, | ||
javascript: ` | ||
import React, { useState } from 'react'; | ||
import { Sidebar } from 'primereact/sidebar'; | ||
import { Button } from 'primereact/button'; | ||
export default function PTDemo() { | ||
const [visible, setVisible] = useState(false); | ||
return ( | ||
<div className="card flex justify-content-center"> | ||
<Sidebar | ||
pt={{ | ||
root: { className: 'w-25rem' } | ||
}} | ||
visible={visible} | ||
onHide={() => setVisible(false)} | ||
> | ||
<h2>Sidebar</h2> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | ||
consequat. | ||
</p> | ||
</Sidebar> | ||
<Button icon="pi pi-arrow-right" onClick={() => setVisible(true)} /> | ||
</div> | ||
); | ||
} | ||
`, | ||
typescript: ` | ||
import React, { useState } from 'react'; | ||
import { Sidebar } from 'primereact/sidebar'; | ||
import { Button } from 'primereact/button'; | ||
export default function PTDemo() { | ||
const [visible, setVisible] = useState(false); | ||
return ( | ||
<div className="card flex justify-content-center"> | ||
<Sidebar | ||
pt={{ | ||
root: { className: 'w-25rem' } | ||
}} | ||
visible={visible} | ||
onHide={() => setVisible(false)} | ||
> | ||
<h2>Sidebar</h2> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | ||
consequat. | ||
</p> | ||
</Sidebar> | ||
<Button icon="pi pi-arrow-right" onClick={() => setVisible(true)} /> | ||
</div> | ||
); | ||
} | ||
` | ||
}; | ||
|
||
return ( | ||
<> | ||
<DocSectionText {...props}></DocSectionText> | ||
<div className="card flex justify-content-center"> | ||
<Sidebar | ||
pt={{ | ||
root: { className: 'w-25rem' } | ||
}} | ||
visible={visible} | ||
onHide={() => setVisible(false)} | ||
> | ||
<h2>Sidebar</h2> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | ||
consequat. | ||
</p> | ||
</Sidebar> | ||
<Button icon="pi pi-arrow-right" onClick={() => setVisible(true)} /> | ||
</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
Oops, something went wrong.