-
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
Showing
7 changed files
with
369 additions
and
22 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,111 @@ | ||
import { DocSectionText } from '../../common/docsectiontext'; | ||
import { DocSectionCode } from '../../common/docsectioncode'; | ||
import { Steps } from '../../../lib/steps/Steps'; | ||
|
||
export function PTDoc(props) { | ||
const items = [ | ||
{ | ||
label: 'Personal' | ||
}, | ||
{ | ||
label: 'Seat' | ||
}, | ||
{ | ||
label: 'Payment' | ||
}, | ||
{ | ||
label: 'Confirmation' | ||
} | ||
]; | ||
|
||
const code = { | ||
basic: ` | ||
<Steps | ||
model={items} | ||
pt={{ | ||
root: { className: 'w-30rem' } | ||
}} | ||
/> | ||
`, | ||
javascript: ` | ||
import React from 'react'; | ||
import { Steps } from 'primereact/steps'; | ||
export default function PTDemo() { | ||
const items = [ | ||
{ | ||
label: 'Personal' | ||
}, | ||
{ | ||
label: 'Seat' | ||
}, | ||
{ | ||
label: 'Payment' | ||
}, | ||
{ | ||
label: 'Confirmation' | ||
} | ||
]; | ||
return ( | ||
<div class="card flex justify-content-center"> | ||
<Steps | ||
model={items} | ||
pt={{ | ||
root: { className: 'w-30rem' } | ||
}} | ||
/> | ||
</div> | ||
) | ||
} | ||
`, | ||
typescript: ` | ||
import React from 'react'; | ||
import { Steps } from 'primereact/steps'; | ||
import { MenuItem } from 'primereact/menuitem'; | ||
export default function PTDemo() { | ||
const items: MenuItem[] = [ | ||
{ | ||
label: 'Personal' | ||
}, | ||
{ | ||
label: 'Seat' | ||
}, | ||
{ | ||
label: 'Payment' | ||
}, | ||
{ | ||
label: 'Confirmation' | ||
} | ||
]; | ||
return ( | ||
<div class="card flex justify-content-center"> | ||
<Steps | ||
model={items} | ||
pt={{ | ||
root: { className: 'w-30rem' } | ||
}} | ||
/> | ||
</div> | ||
) | ||
} | ||
` | ||
}; | ||
|
||
return ( | ||
<> | ||
<DocSectionText {...props}></DocSectionText> | ||
<div class="card flex justify-content-center"> | ||
<Steps | ||
model={items} | ||
pt={{ | ||
root: { className: 'w-30rem' } | ||
}} | ||
/> | ||
</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="https://primefaces.org/cdn/primereact/images/pt/wireframe-placeholder.jpg" alt="steps" /> | ||
</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.