Nextjs Core Badges
-Pro Component
Style
You will find the styles for this component in
assets/jss/nextjs-material-dashboard-pro/components/badgeStyle.js
.
Example
gray
primary
warning
danger
success
info
rose
import React from "react";
import Badge from "components/Badge/Badge.js";
function Example() {
return (
<>
<Badge color="gray">gray</Badge>
<Badge color="primary">primary</Badge>
<Badge color="warning">warning</Badge>
<Badge color="danger">danger</Badge>
<Badge color="success">success</Badge>
<Badge color="info">info</Badge>
<Badge color="rose">rose</Badge>
</>
);
}
export default Example;
Props
Badge.defaultProps = {
color: "gray"
}
Badge.propTypes = {
color: PropTypes.oneOf([
"primary",
"warning",
"danger",
"success",
"info",
"rose",
"gray",
]),
children: PropTypes.node,
};