Skip to content

Commit

Permalink
fix(app): table styles
Browse files Browse the repository at this point in the history
  • Loading branch information
cor committed May 30, 2024
1 parent ce58fd4 commit b1df471
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,5 @@ export let variant: "long" | "short" = "short"
export { _class as class }
</script>

<div class='min-w-18'>
<Duration {totalUnits} {variant} {minUnits} {start} class={_class} {...$$restProps} />
</div>
<Duration {totalUnits} {variant} {minUnits} {start} class={_class} {...$$restProps} />

<style lang="postcss"></style>
15 changes: 5 additions & 10 deletions app/src/routes/explorer/blocks/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ $: if (blockData) {
const defaultColumns: Array<ColumnDef<CosmosBlock>> = [
{
accessorKey: "time",
size: 90,
maxSize: 90,
minSize: 90,
size: 100,
meta: {
class: "ml-1.5 justify-start"
},
Expand All @@ -68,7 +66,6 @@ const defaultColumns: Array<ColumnDef<CosmosBlock>> = [
accessorKey: "height",
header: info => "Height",
size: 100,
maxSize: 100,
meta: {
class: "w-full justify-start"
},
Expand Down Expand Up @@ -100,11 +97,10 @@ const defaultColumns: Array<ColumnDef<CosmosBlock>> = [
{
accessorKey: "hash",
meta: {
class: "w-full justify-end"
class: "w-full justify-start ml-1.5"
},
header: info => flexRender(CellText, { value: "Hash", class: "text-right pr-3" }),
size: 400,
maxSize: 400,
header: info => flexRender(CellText, { value: "Hash", class: "text-left" }),
size: 1000,
cell: info =>
flexRender(Button, {
class: "py-0 px-2.5 max-w-[600px]",
Expand Down Expand Up @@ -180,7 +176,7 @@ $: virtualizer = createVirtualizer<HTMLDivElement, HTMLTableRowElement>({
on:click={header.column.getToggleSortingHandler()}
class={cn(
header.column.columnDef.meta?.class,
'cursor-pointer select-none capitalize px-0 hover:bg-transparent font-mono text-md',
'cursor-pointer select-none capitalize px-0 hover:bg-transparent text-md',
)}
>
<svelte:component
Expand Down Expand Up @@ -217,7 +213,6 @@ $: virtualizer = createVirtualizer<HTMLDivElement, HTMLTableRowElement>({

<style lang="postcss">
:global(tr td:last-child) {
text-align: right;
font-variant-numeric: tabular-nums;
font-variant: common-ligatures tabular-nums;
}
Expand Down

0 comments on commit b1df471

Please sign in to comment.