feat(renderer): add shadcn label primitive

This commit is contained in:
2026-06-05 17:03:10 +05:30
parent 89590a349a
commit d22d616727
4 changed files with 85 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';
import { Label } from '@/components/ui/label';
describe('Label', () => {
it('renders children and associates with a control', () => {
render(
<>
<Label htmlFor="x">Username</Label>
<input id="x" />
</>
);
const label = screen.getByText(/username/i);
expect(label).toBeInTheDocument();
expect(label.tagName).toBe('LABEL');
});
});