impr: improve design consistency/rounding
This commit is contained in:
10 files changed
+65
-38
No files matched your search
@@ -147,7 +147,7 @@
|
||||
<button
|
||||
class={[
|
||||
'row-span-2 shrink-0 mr-2 self-center group/btn',
|
||||
'bg-slate-200 dark:bg-zinc-800 rounded-md cursor-pointer',
|
||||
'bg-slate-200 dark:bg-zinc-800 rounded-lg cursor-pointer',
|
||||
]}
|
||||
>
|
||||
<Avatar
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
buttonColor.ghost,
|
||||
'rounded-full h-full font-medium flex items-center *:p-2',
|
||||
'hover:bg-white dark:hover:bg-zinc-900 overflow-hidden transition-colors shrink-0',
|
||||
'text-inherit! divide-x divide-slate-200 dark:divide-zinc-800',
|
||||
'text-inherit! divide-x divide-slate-200 dark:divide-zinc-800 shadow-xs',
|
||||
loading && 'animate-pulse opacity-75 pointer-events-none',
|
||||
]}
|
||||
role="group"
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
<div
|
||||
class="flex flex-col border border-slate-200 border-b-slate-300 dark:border-t-zinc-700/70 dark:border-zinc-800
|
||||
focus-within:border-primary-900 dark:focus-within:border-primary-100 focus-within:ring-3 ring-slate-300
|
||||
dark:ring-zinc-700 rounded-xl
|
||||
dark:ring-zinc-700 rounded-2xl
|
||||
overflow-hidden transition-colors {clazz}"
|
||||
class:mt-1={label}
|
||||
>
|
||||
|
||||
@@ -65,17 +65,21 @@
|
||||
{alt}
|
||||
{width}
|
||||
{title}
|
||||
class={['aspect-square object-cover overflow-hidden shrink-0', clazz]}
|
||||
class={[
|
||||
'aspect-square object-cover overflow-hidden shrink-0',
|
||||
circle ? 'rounded-full' : 'rounded-lg',
|
||||
clazz,
|
||||
]}
|
||||
style="width: {width}px; height: {width}px; {style}"
|
||||
class:rounded-full={circle}
|
||||
class:rounded-md={!circle}
|
||||
/>
|
||||
{:else}
|
||||
<div
|
||||
style="width: {width}px; height: {width}px;"
|
||||
class={['aspect-square object-cover overflow-hidden shrink-0', clazz]}
|
||||
class:rounded-full={circle}
|
||||
class:rounded-md={!circle}
|
||||
class={[
|
||||
'aspect-square object-cover overflow-hidden shrink-0',
|
||||
circle ? 'rounded-full' : 'rounded-lg',
|
||||
clazz,
|
||||
]}
|
||||
>
|
||||
{@html createAvatar(initials, {
|
||||
seed: alt,
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
<script lang="ts">
|
||||
const sizes = {
|
||||
sm: 'text-2xl',
|
||||
md: 'text-3xl',
|
||||
lg: 'text-4xl',
|
||||
xl: 'text-6xl',
|
||||
}
|
||||
|
||||
interface Props {
|
||||
pageHeader?: boolean
|
||||
style?: string
|
||||
class?: string
|
||||
size?: keyof typeof sizes
|
||||
children?: import('svelte').Snippet
|
||||
extended?: import('svelte').Snippet
|
||||
}
|
||||
@@ -11,6 +19,7 @@
|
||||
pageHeader = false,
|
||||
style = '',
|
||||
class: clazz = '',
|
||||
size = 'lg',
|
||||
children,
|
||||
extended,
|
||||
}: Props = $props()
|
||||
@@ -26,7 +35,7 @@
|
||||
{style}
|
||||
>
|
||||
<h1
|
||||
class="text-4xl flex gap-2 w-full tracking-tight font-medium {clazz ?? ''}"
|
||||
class={[sizes[size], 'flex gap-2 w-full tracking-tight font-medium', clazz]}
|
||||
>
|
||||
{@render children?.()}
|
||||
</h1>
|
||||
|
||||
Reference in new issue
Block a user