Skip to content

Commit

Permalink
Responsive fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nas5w committed Jan 28, 2025
1 parent 0730814 commit 3c28d86
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions projects/web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,19 @@ function App() {
const displayName = element.metadata?.displayName;
const showDisplayName = !hasChildren && displayName;

const marginLeft = `${20 * (level - 1)}px`;

return (
<div {...getNodeProps()}>
<button
className="w-full rounded-lg border bg-card text-card-foreground p-4 transition-colors hover:bg-accent/50 mt-2"
style={{
marginLeft: `${20 * (level - 1)}px`,
marginLeft,
width: `calc(100% - ${marginLeft})`,
cursor: hasChildren ? "pointer" : "default",
}}
>
<div className="flex items-center justify-between">
<div className="flex items-center justify-between flex-wrap gap-4">
<div className="flex items-center gap-3">
{hasChildren ? (
<ChevronRight
Expand Down Expand Up @@ -194,7 +197,7 @@ function App() {
asChild
variant="outline"
size="sm"
className="ml-4 text-blueSkyBrand"
className="text-blueSkyBrand"
onKeyDown={(e) => {
if (e.key === "Enter") {
e.currentTarget.querySelector("a")?.click();
Expand Down

0 comments on commit 3c28d86

Please sign in to comment.