Skip to content

Commit 2f28172

Browse files
committed
[fix] some CSS bugs
1 parent 6c332d5 commit 2f28172

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

registry/new-york/blocks/editor/tool.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function renderTool(this: Tool, editor: RefObject<HTMLElement>) {
1919
title={title}
2020
variant={active ? "default" : "outline"}
2121
size="icon-sm"
22-
className="mr-2 mb-2"
22+
className="mr-2 mb-2 p-2"
2323
disabled={!usable}
2424
onClick={(event) => {
2525
event.preventDefault();

registry/new-york/blocks/editor/tools/color.tsx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Button } from "@/components/ui/button";
1111

1212
export interface ColorSelectorProps
1313
extends Partial<Record<"className" | "title" | "value", string>> {
14-
icon: "file-earmark-font" | "file-earmark-font-fill";
14+
icon: "Type" | "FileText";
1515
type: ColorName;
1616
onChange?: (color: string) => any;
1717
}
@@ -38,6 +38,7 @@ export const ColorSelector: FC<ColorSelectorProps> = ({
3838
type="button"
3939
variant="outline"
4040
size="icon-sm"
41+
className="p-2"
4142
style={{
4243
color: type === "color" ? value : undefined,
4344
backgroundColor: type === "color" ? undefined : value,
@@ -52,10 +53,16 @@ export const ColorSelector: FC<ColorSelectorProps> = ({
5253
input.click();
5354
}}
5455
>
55-
{icon === "file-earmark-font" ? (
56-
<Type className="size-4" />
56+
{icon === "Type" ? (
57+
<Type
58+
className="size-4"
59+
style={type !== "color" ? { filter: "invert(1)" } : undefined}
60+
/>
5761
) : (
58-
<FileText className="size-4" />
62+
<FileText
63+
className="size-4"
64+
style={type !== "color" ? { filter: "invert(1)" } : undefined}
65+
/>
5966
)}
6067
</Button>
6168
</span>
@@ -83,11 +90,11 @@ export function renderColorTool(
8390
}
8491

8592
export class ForeColorTool extends FCT {
86-
icon = "file-earmark-font";
93+
icon = "Type";
8794
render = renderColorTool;
8895
}
8996

9097
export class BackColorTool extends BCT {
91-
icon = "file-earmark-font-fill";
98+
icon = "FileText";
9299
render = renderColorTool;
93100
}

registry/new-york/blocks/rest-table/example.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { RestTable } from "./rest-table";
99
configure({ enforceActions: "never" });
1010

1111
export const RestTableExample = () => (
12-
<div className="w-full h-screen">
12+
<div className="w-full">
1313
<RestTable
1414
className="text-center"
1515
editable

registry/new-york/blocks/rest-table/rest-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ export class RestTable<
366366

367367
return (
368368
<div className={className} {...props}>
369-
<header className="sticky top-0 bg-background py-3 flex flex-wrap gap-3 justify-between items-center border-b">
369+
<header className="sticky top-0 z-1 bg-background/80 backdrop-blur py-3 flex flex-wrap gap-3 justify-between items-center border-b">
370370
{filterFields && (
371371
<RestForm
372372
className="flex flex-wrap items-center gap-3 pb-3 m-0 border-b"

0 commit comments

Comments
 (0)