-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a22bfd
commit 2133d46
Showing
6 changed files
with
56 additions
and
91 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 |
---|---|---|
@@ -1,27 +1,16 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import type { ElementType, ReactNode } from 'react'; | ||
|
||
export type BadgeProps = { | ||
/** | ||
* Additional classes for the badge component. | ||
*/ | ||
className?: string; | ||
/** | ||
* Component type that will be used to render the badge component. | ||
* | ||
* @default 'div' | ||
*/ | ||
as?: ElementType; | ||
/** | ||
* Badge variant. | ||
* | ||
* @default 'generic' | ||
* @default 'default' | ||
*/ | ||
context?: 'neutral' | 'info' | 'success' | 'warning' | 'error'; | ||
intent?: 'default' | 'info' | 'success' | 'warning' | 'error'; | ||
/** | ||
* Element to display inside the badge. | ||
* Text to display inside the badge. | ||
*/ | ||
children: ReactNode; | ||
children: string; | ||
}; |
This file contains 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