-
Notifications
You must be signed in to change notification settings - Fork 376
feat(Button): added circle variant #12092
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
Merged
wise-king-sullyman
merged 7 commits into
patternfly:main
from
thatblindgeye:iss12081_circleButton
Oct 28, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6aecf2e
feat(Button): added circle variant
thatblindgeye fc895a5
Added test
thatblindgeye 4e31acb
Updated prop to beta
thatblindgeye 5c99f04
Added prop to menu toggle
thatblindgeye 1954019
Bumped core to pull in styles
thatblindgeye e5239cb
Added prop to example
thatblindgeye 25c23b0
Bumped to core 6.5 prerelease 9
thatblindgeye File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
63 changes: 63 additions & 0 deletions
63
packages/react-core/src/components/Button/examples/ButtonCircle.tsx
This file contains hidden or 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,63 @@ | ||
| import { Button, Flex } from '@patternfly/react-core'; | ||
| import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon'; | ||
| import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; | ||
| import CopyIcon from '@patternfly/react-icons/dist/esm/icons/copy-icon'; | ||
| import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon'; | ||
| import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon'; | ||
|
|
||
| interface LoadingPropsType { | ||
| spinnerAriaValueText: string; | ||
| spinnerAriaLabelledBy?: string; | ||
| spinnerAriaLabel?: string; | ||
| isLoading: boolean; | ||
| } | ||
|
|
||
| export const ButtonCircle: React.FunctionComponent = () => { | ||
| const [isUploading, setIsUploading] = useState<boolean>(false); | ||
|
|
||
| const uploadingProps = {} as LoadingPropsType; | ||
| uploadingProps.spinnerAriaValueText = 'Loading circle variant example'; | ||
| uploadingProps.spinnerAriaLabel = 'Uploading circle variant example data'; | ||
| uploadingProps.isLoading = isUploading; | ||
|
|
||
| return ( | ||
| <Flex columnGap={{ default: 'columnGapSm' }}> | ||
| <Button isCircle icon={<PlusCircleIcon />} aria-label="Add primary circle variant example" /> | ||
| <Button | ||
| variant="secondary" | ||
| isCircle | ||
| icon={<PlusCircleIcon />} | ||
| aria-label="Add secondary circle variant example" | ||
| /> | ||
| <Button variant="tertiary" isCircle icon={<PlusCircleIcon />} aria-label="Add tertiary circle variant example" /> | ||
| <Button variant="danger" isCircle icon={<PlusCircleIcon />} aria-label="Add danger circle variant example" /> | ||
| <Button variant="warning" isCircle icon={<PlusCircleIcon />} aria-label="Add warning circle variant example" /> | ||
| <Button variant="link" isCircle icon={<PlusCircleIcon />} aria-label="Add link circle variant example" /> | ||
| <Button variant="control" isCircle icon={<CopyIcon />} aria-label="Copy control circle variant example" /> | ||
| <Button variant="plain" isCircle icon={<TimesIcon />} aria-label="Remove plain circle variant example" /> | ||
| <Button variant="stateful" isCircle icon={<BellIcon />} aria-label="Stateful unread circle variant example" /> | ||
| <Button | ||
| variant="stateful" | ||
| state="read" | ||
| isCircle | ||
| icon={<BellIcon />} | ||
| aria-label="Stateful read circle variant example" | ||
| /> | ||
| <Button | ||
| variant="stateful" | ||
| state="attention" | ||
| isCircle | ||
| icon={<BellIcon />} | ||
| aria-label="Stateful attention circle variant example" | ||
| /> | ||
| <Button | ||
| variant="plain" | ||
| isCircle | ||
| {...(!isUploading && { 'aria-label': 'Upload circle variant example' })} | ||
| onClick={() => setIsUploading(!isUploading)} | ||
| icon={<UploadIcon />} | ||
| {...uploadingProps} | ||
| /> | ||
| </Flex> | ||
| ); | ||
| }; | ||
This file contains hidden or 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 hidden or 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 hidden or 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
11 changes: 11 additions & 0 deletions
11
packages/react-core/src/components/MenuToggle/examples/MenuTogglePlainCircle.tsx
This file contains hidden or 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,11 @@ | ||
| import { Fragment } from 'react'; | ||
| import { MenuToggle } from '@patternfly/react-core'; | ||
| import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; | ||
|
|
||
| export const MenuTogglePlainCircle: React.FunctionComponent = () => ( | ||
| <Fragment> | ||
| <MenuToggle isCircle icon={<EllipsisVIcon />} variant="plain" aria-label="plain circle kebab" />{' '} | ||
| <MenuToggle isCircle icon={<EllipsisVIcon />} variant="plain" isExpanded aria-label="plain circle expanded kebab" />{' '} | ||
| <MenuToggle isCircle icon={<EllipsisVIcon />} variant="plain" isDisabled aria-label="disabled plain circle kebab" /> | ||
| </Fragment> | ||
| ); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs
isCircleon this one.