Skip to content

Commit 2e30030

Browse files
committed
style fixes
1 parent 6495fb7 commit 2e30030

File tree

7 files changed

+11
-10
lines changed

7 files changed

+11
-10
lines changed

panda.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export default defineConfig({
2828
borderColor: "white",
2929
},
3030
a: {
31+
padding: 0,
3132
color: "link",
3233
transition: "color 0.25s",
3334
"&:hover": {

src/components/ui/molecules/Checkbox/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ const cn = {
2424
width: "1em",
2525
height: "1em",
2626
backgroundColor: "light",
27+
borderRadius: "xs",
2728
})
2829
),
2930
indicator: css({
3031
position: "relative",
3132
color: "container",
32-
fontSize: "sm",
33+
fontSize: "xs",
3334
}),
3435
};
3536

src/components/ui/molecules/Table/actions.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const cn = {
5050
base: { cursor: "pointer" },
5151
variants: {
5252
active: {
53-
true: { color: "text" },
53+
true: { color: "{text}" },
5454
false: { color: "neutral" },
5555
},
5656
},

src/components/ui/molecules/Table/cell.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ const cn = {
4040
textAlign: "center",
4141
gap: 1,
4242
height: "fit-content",
43-
"& > *": { paddingX: 1 },
4443
}),
4544
accessor: cva({
4645
variants: {

src/components/ui/organisms/Actions/index.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ interface Item {
1010
}
1111
interface Props {
1212
items: Record<string, Item>;
13+
spacing?: number;
1314
}
1415

15-
function Component({ items }: PropsWithChildren<Props>) {
16+
function Component({ items, spacing = 2 }: PropsWithChildren<Props>) {
1617
const entries = useMemo(() => Object.entries(items), [items]);
1718
return (
18-
<div className={cn.row}>
19+
<div className={cn.row} style={{ gap: `${spacing / 4}em` }}>
1920
{entries.map(([key, { icon, render, condition }]) => {
2021
if (condition && !condition()) return;
2122
return <Fragment key={key}>{render(Icon, { key, icon: icon })}</Fragment>;
@@ -25,7 +26,7 @@ function Component({ items }: PropsWithChildren<Props>) {
2526
}
2627

2728
const cn = {
28-
row: hstack({ padding: 0, gap: 3 }),
29+
row: hstack({ padding: 0 }),
2930
};
3031

3132
export { Component, type Item };

src/components/ui/templates/actions/row.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface Props<T> {
1717
onDelete?: (ids: string[]) => void;
1818
}
1919

20-
function Component<T>({ table, ids, onSubmit, onDelete }: Props<T>) {
20+
function Component<T>({ table, ids, onSubmit, onDelete, ...rest }: Props<T>) {
2121
const { key } = useParams("/:key");
2222
const { state, dispatch } = useDataset(key);
2323
if (!state) throw Error("The dataset does not exist.");
@@ -84,7 +84,7 @@ function Component<T>({ table, ids, onSubmit, onDelete }: Props<T>) {
8484
}, [disable, handleDelete, handleSubmit, shared]);
8585

8686
if (ids.length <= 0) return null;
87-
return <Actions items={items} />;
87+
return <Actions items={items} spacing={2} />;
8888
}
8989

9090
export { Component };

src/components/ui/templates/tables/dataset.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { RowActions } from "$/components/ui/templates";
44
import { characteristics, difficulties } from "$/constants/beatmap";
55
import { calc, formatDuration, formatters } from "$/helpers";
66
import { Link } from "$/router";
7-
import { css } from "$/styles/css";
87
import { center } from "$/styles/patterns";
98
import { token } from "$/styles/tokens";
109
import { IEntry } from "$/types";
@@ -32,7 +31,7 @@ export const columns = [
3231
return (
3332
<Table.Cell context={c} className={center({ gap: 2 })}>
3433
<Checkbox id={c.row.id} checked={c.row.getIsSelected()} onCheckedChange={(x) => c.row.toggleSelected(!!x)} />
35-
<Link to={"/:key/level/:sid/:bid"} params={{ key: c.table.options.meta!.id, sid, bid }} className={css({ padding: 0 })}>
34+
<Link to={"/:key/level/:sid/:bid"} params={{ key: c.table.options.meta!.id, sid, bid }}>
3635
<Icon icon={faExternalLink} />
3736
</Link>
3837
</Table.Cell>

0 commit comments

Comments
 (0)