Skip to content

Commit

Permalink
Added plain prop into classes and updated demos (#5279)
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrogenous authored Nov 10, 2023
1 parent 92607ee commit c0cfc0b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/doc/button/raisedtextdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default function RaisedTextDemo() {
<Button label="Warning" severity="warning" text raised />
<Button label="Help" severity="help" text raised />
<Button label="Danger" severity="danger" text raised />
<Button label="Plain" plain text raised />
</div>
<DocSectionCode code={code} />
</>
Expand Down
1 change: 1 addition & 0 deletions components/doc/button/textdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default function TextDemo() {
<Button label="Warning" severity="warning" text />
<Button label="Help" severity="help" text />
<Button label="Danger" severity="danger" text />
<Button label="Plain" plain text />
</div>
<DocSectionCode code={code} />
</>
Expand Down
2 changes: 1 addition & 1 deletion components/lib/button/ButtonBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const classes = {
}),
label: 'p-button-label p-c',
root: ({ props, size, disabled }) =>
classNames('p-button p-component', {
classNames('p-button p-component', props?.plain ? 'p-button-plain' : '', {
'p-button-icon-only': (props.icon || props.loading) && !props.label && !props.children,
'p-button-vertical': (props.iconPos === 'top' || props.iconPos === 'bottom') && props.label,
'p-disabled': disabled,
Expand Down

0 comments on commit c0cfc0b

Please sign in to comment.