This commit is contained in:
Philippe Torrel
2026-08-07 11:24:07 +02:00
parent 2c47aa98b8
commit 70a9d3ca08
273 changed files with 26737 additions and 38 deletions

View File

@@ -1,12 +1,16 @@
import Badge from './components/Badge';
function App() {
return (
<main>
<div className="container py-5">
<h1>Badges</h1>
{/* <Badge text="Neu" variant="success" />
<Badge text="Neu" variant="success" />
<Badge text="Oh oh" variant="danger" />
<Badge text="new idea" variant="info" />
<Badge text="Rabatt" variant="warning" /> */}
<Badge text="Rabatt" variant="warning" />
<Badge text="Mega" color="tomato" />
<Badge text="Mega" color="#17537b" />
</div>
</main>
);

View File

@@ -0,0 +1,11 @@
const Badge = (props) => {
const { text = '', variant = 'secondary', color = '' } = props;
return (
<span className={`badge ${!color ? `text-bg-${variant}` : ''} mx-1`} style={{ backgroundColor: color }}>
{text}
</span>
);
// <span className={`badge text-bg-${variant}`}>{text};</span>
};
export default Badge;