Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5278 Added plain prop into classes and updated demos #5279

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading