Skip to content

Commit

Permalink
Redo badge story
Browse files Browse the repository at this point in the history
  • Loading branch information
razzeee committed Oct 13, 2024
1 parent a0e87ef commit 28835b4
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions frontend/src/components/application/Badge.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
import React from "react"
import { Meta } from "@storybook/react"
import type { Meta, StoryObj } from "@storybook/react"

import Badge from "./Badge"
import React from "react"

export default {
title: "Components/Application/Badge",
const meta = {
component: Badge,
} as Meta<typeof Badge>
} satisfies Meta<typeof Badge>

export default meta

type Story = StoryObj<typeof meta>

export const TextOnly = () => {
return <Badge text={"Outdated"} />
export const TextOnly: Story = {
args: {
text: "Outdated",
},
}

export const InACard = () => {
return (
export const InACard: Story = {
args: {
text: "Outdated",
inACard: true,
},
render: (args) => (
<div className="rounded-xl bg-flathub-white p-4 pt-3 shadow-md dark:bg-flathub-arsenic">
<Badge text={"Outdated"} inACard={true} />
<Badge {...args} />
</div>
)
),
}

0 comments on commit 28835b4

Please sign in to comment.