Skip to content

Commit

Permalink
Fixed #1748 - Add icons property to Panel
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Jan 9, 2021
1 parent 182f973 commit 7ed55cf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/components/panel/Panel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ interface PanelProps {
style?: object;
className?: string;
collapsed?: boolean;
expandIcon?: string,
collapseIcon?: string,
expandIcon?: string;
collapseIcon?: string;
icons?: any;
onExpand?(event: Event): void;
onCollapse?(event: Event): void;
onToggle?(e: {event: Event, value: boolean}): void;
}

export class Panel extends React.Component<PanelProps,any> {}
export class Panel extends React.Component<PanelProps,any> {}
12 changes: 9 additions & 3 deletions src/showcase/panel/PanelDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ import { Panel } from 'primereact/panel';
`}
</CodeHighlight>

<p>Instead of simple strings, <i>header</i> propery also can be used to provide custom content as JSX.</p>
<p><i>header</i> propery also can be used to provide custom content as JSX.</p>

<h5>Toggleable</h5>
<p>Content of the panel can be expanded and collapsed using <i>toggleable</i> option. A toggleable panel can either be used as a Controlled or Uncontrolled component.</p>
Expand Down Expand Up @@ -184,16 +184,22 @@ import { Panel } from 'primereact/panel';
</tr>
<tr>
<td>header</td>
<td>string</td>
<td>any</td>
<td>null</td>
<td>Header text of the panel.</td>
<td>Custom header template of the panel.</td>
</tr>
<tr>
<td>toggleable</td>
<td>boolean</td>
<td>false</td>
<td>Defines if content of panel can be expanded and collapsed.</td>
</tr>
<tr>
<td>icons</td>
<td>any</td>
<td>null</td>
<td>Custom icons template for the header.</td>
</tr>
<tr>
<td>style</td>
<td>object</td>
Expand Down

0 comments on commit 7ed55cf

Please sign in to comment.