chore: add more stories (#27403)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
非法操作
2025-10-29 14:33:43 +08:00
committed by GitHub
parent 23b49b8304
commit f092bc1912
100 changed files with 6144 additions and 30 deletions

View File

@@ -0,0 +1,53 @@
import type { Meta, StoryObj } from '@storybook/nextjs'
import CornerLabel from '.'
const meta = {
title: 'Base/Data Display/CornerLabel',
component: CornerLabel,
parameters: {
docs: {
description: {
component: 'Decorative label that anchors to card corners. Useful for marking “beta”, “deprecated”, or similar callouts.',
},
source: {
language: 'tsx',
code: `
<CornerLabel label="beta" />
`.trim(),
},
},
},
tags: ['autodocs'],
args: {
label: 'beta',
},
} satisfies Meta<typeof CornerLabel>
export default meta
type Story = StoryObj<typeof meta>
export const Default: Story = {}
export const OnCard: Story = {
render: args => (
<div className="relative w-80 rounded-2xl border border-divider-subtle bg-components-panel-bg p-6">
<CornerLabel {...args} className="absolute right-[-1px] top-[-1px]" />
<div className="text-sm text-text-secondary">
Showcase how the label sits on a card header. Pair with contextual text or status information.
</div>
</div>
),
parameters: {
docs: {
source: {
language: 'tsx',
code: `
<div className="relative">
<CornerLabel label="beta" className="absolute left-[-1px] top-[-1px]" />
...card content...
</div>
`.trim(),
},
},
},
}