refactor: go fully native — remove all remaining shadcn component usage
Replace shadcn Select → native <select>: - ascii/FontPreview.tsx: comment-style picker → glass pill wrapper with MessageSquareCode icon + native select - color/ExportMenu.tsx: format + color-space pickers → native select with shared selectCls - units/MainConverter.tsx: from/to unit pickers → native select Delete dead code: - components/media/FormatSelector.tsx (not imported anywhere, used shadcn Input + Label + Card) - components/ui/select.tsx — now unused - components/ui/input.tsx — now unused - components/ui/label.tsx — now unused - components/ui/card.tsx — now unused Remaining components/ui/: slider.tsx, tooltip.tsx (TooltipProvider in Providers.tsx), slider-row.tsx, color-input.tsx Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,13 +2,6 @@
|
||||
|
||||
import * as React from 'react';
|
||||
import { toPng } from 'html-to-image';
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@/components/ui/select';
|
||||
import {
|
||||
Copy,
|
||||
Download,
|
||||
@@ -205,19 +198,18 @@ export function FontPreview({
|
||||
</div>
|
||||
|
||||
{/* Comment style */}
|
||||
<Select value={commentStyle} onValueChange={(v) => setCommentStyle(v as CommentStyle)}>
|
||||
<SelectTrigger className="h-7! w-auto gap-1.5 text-[10px] border-border/30 bg-transparent hover:border-primary/30 transition-colors">
|
||||
<MessageSquareCode className="w-3 h-3 text-muted-foreground/60 shrink-0" />
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<div className="flex items-center gap-1 px-2 py-1 glass rounded-md border border-border/30 text-muted-foreground hover:border-primary/30 hover:text-primary transition-colors">
|
||||
<MessageSquareCode className="w-3 h-3 shrink-0" />
|
||||
<select
|
||||
value={commentStyle}
|
||||
onChange={(e) => setCommentStyle(e.target.value as CommentStyle)}
|
||||
className="bg-transparent outline-none text-[10px] font-mono cursor-pointer"
|
||||
>
|
||||
{COMMENT_STYLES.map((s) => (
|
||||
<SelectItem key={s.value} value={s.value}>
|
||||
{s.label}
|
||||
</SelectItem>
|
||||
<option key={s.value} value={s.value}>{s.label}</option>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{/* Stats */}
|
||||
{!isLoading && text && (
|
||||
|
||||
Reference in New Issue
Block a user