Skip to content

Commit

Permalink
Fix primefaces#3124: Ability to hide certain code sandbox props
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Aug 18, 2022
1 parent 01786b3 commit 7d1f890
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions components/doc/common/docactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,22 @@ export const DocActions = (props) => {
const items = [
{
label: 'Hooks Source Demo',
className: props.showHooksSource === false ? 'hidden' : '',
command: () => liveEditor.current.postSandboxParameters('hooks', toast)
},
{
label: 'Class Source Demo',
className: props.showClassSource === false ? 'hidden' : '',
command: () => liveEditor.current.postSandboxParameters('class', toast)
},
{
label: 'TS Source Demo',
className: props.showTsSource === false ? 'hidden' : '',
command: () => liveEditor.current.postSandboxParameters('ts', toast)
},
{
label: 'Browser Source Demo',
className: props.showBrowserSource === false ? 'hidden' : '',
command: () => liveEditor.current.postSandboxParameters('browser', toast)
}
];
Expand Down
2 changes: 1 addition & 1 deletion pages/formik/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const FormikFormDemo = () => {
<p>PrimeReact components can be easily used/integrated with <a href="https://formik.org/">Formik</a>. In this example, a register panel is simulated using Formik.</p>
</div>

<DocActions github="formik/index.js" />
<DocActions github="formik/index.js" showClassSource={false} showBrowserSource={false}/>
</div>
<div className="content-section implementation form-demo">
<Dialog visible={showMessage} onHide={() => setShowMessage(false)} position="top" footer={dialogFooter} showHeader={false} breakpoints={{ '960px': '80vw' }} style={{ width: '30vw' }}>
Expand Down
2 changes: 1 addition & 1 deletion pages/reactfinalform/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const ReactFinalFormDemo = () => {

</div>

<DocActions github="validate/index.js" />
<DocActions github="validate/index.js" showClassSource={false} showBrowserSource={false}/>
</div>

<div className="content-section implementation form-demo">
Expand Down
2 changes: 1 addition & 1 deletion pages/reacthookform/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const ReactHookFormDemo = () => {
<p>PrimeReact components can be easily used/integrated with <a href="https://react-hook-form.com/">React Hook Form</a>. In this example, a register panel is simulated using React Hook Form.</p>
</div>

<DocActions github="validate/index.js" />
<DocActions github="validate/index.js" showClassSource={false} showBrowserSource={false} />
</div>

<div className="content-section implementation form-demo">
Expand Down

0 comments on commit 7d1f890

Please sign in to comment.