style: 🎨

This commit is contained in:
codytseng
2025-07-30 22:40:50 +08:00
parent ed4800de6e
commit 811388dd2e
3 changed files with 8 additions and 8 deletions

View File

@@ -95,7 +95,7 @@ export default function Image({
return ( return (
<div className={cn('relative', classNames.wrapper)} {...props}> <div className={cn('relative', classNames.wrapper)} {...props}>
{isLoading && <Skeleton className={cn('absolute inset-0 rounded-lg', className)} />} {isLoading && <Skeleton className={cn('absolute inset-0', className)} />}
{!hasError ? ( {!hasError ? (
<img <img
src={imageUrl} src={imageUrl}

View File

@@ -167,7 +167,7 @@ export default function Poll({ event, className }: { event: Event; className?: s
key={option.id} key={option.id}
title={option.label} title={option.label}
className={cn( className={cn(
'relative w-full px-4 py-3 rounded-lg border transition-all flex items-center gap-2', 'relative w-full px-4 py-3 rounded-lg border transition-all flex items-center gap-2 overflow-hidden',
canVote ? 'cursor-pointer' : 'cursor-not-allowed', canVote ? 'cursor-pointer' : 'cursor-not-allowed',
canVote && canVote &&
(selectedOptionIds.includes(option.id) (selectedOptionIds.includes(option.id)
@@ -203,7 +203,7 @@ export default function Poll({ event, className }: { event: Event; className?: s
{/* Progress Bar Background */} {/* Progress Bar Background */}
<div <div
className={cn( className={cn(
'absolute inset-0 rounded-md transition-all duration-700 ease-out', 'absolute inset-0 rounded-r-sm transition-all duration-700 ease-out',
isMax ? 'bg-primary/60' : 'bg-muted/90' isMax ? 'bg-primary/60' : 'bg-muted/90'
)} )}
style={{ width: `${percentage}%` }} style={{ width: `${percentage}%` }}

View File

@@ -23,14 +23,14 @@ export default function WebPreview({ url, className }: { url: string; className?
if (isSmallScreen && image) { if (isSmallScreen && image) {
return ( return (
<div <div
className="rounded-lg border mt-2" className="rounded-lg border mt-2 overflow-hidden"
onClick={(e) => { onClick={(e) => {
e.stopPropagation() e.stopPropagation()
window.open(url, '_blank') window.open(url, '_blank')
}} }}
> >
<Image image={{ url: image }} className="w-full h-44 rounded-t-lg" hideIfError /> <Image image={{ url: image }} className="w-full h-44 rounded-none" hideIfError />
<div className="bg-muted p-2 w-full rounded-b-lg"> <div className="bg-muted p-2 w-full">
<div className="text-xs text-muted-foreground">{hostname}</div> <div className="text-xs text-muted-foreground">{hostname}</div>
<div className="font-semibold line-clamp-1">{title}</div> <div className="font-semibold line-clamp-1">{title}</div>
</div> </div>
@@ -40,7 +40,7 @@ export default function WebPreview({ url, className }: { url: string; className?
return ( return (
<div <div
className={cn('p-0 clickable flex w-full border rounded-lg', className)} className={cn('p-0 clickable flex w-full border rounded-lg overflow-hidden', className)}
onClick={(e) => { onClick={(e) => {
e.stopPropagation() e.stopPropagation()
window.open(url, '_blank') window.open(url, '_blank')
@@ -49,7 +49,7 @@ export default function WebPreview({ url, className }: { url: string; className?
{image && ( {image && (
<Image <Image
image={{ url: image }} image={{ url: image }}
className="rounded-lg aspect-[4/3] xl:aspect-video object-cover bg-foreground h-44" className="aspect-[4/3] xl:aspect-video object-cover bg-foreground h-44 rounded-none"
hideIfError hideIfError
/> />
)} )}