-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
91 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
app/routes/sketch+/artboards+/$slug_+/components/panel-popover-artboard-design-size.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { Button } from '#app/components/ui/button' | ||
import { Icon } from '#app/components/ui/icon' | ||
import { Input } from '#app/components/ui/input' | ||
import { Label } from '#app/components/ui/label' | ||
import { | ||
Popover, | ||
PopoverContent, | ||
PopoverTrigger, | ||
} from '#app/components/ui/popover' | ||
import { type ISize } from '#app/models/size.server' | ||
|
||
export const PanelPopoverArtboardDesignSize = ({ size }: { size: ISize }) => { | ||
return ( | ||
<div> | ||
<Popover> | ||
<PopoverTrigger asChild> | ||
<Button | ||
variant="ghost" | ||
className="m-2 mr-0 flex h-8 w-8 cursor-pointer items-center justify-center" | ||
> | ||
<Icon name="gear"> | ||
<span className="sr-only">Size Settings</span> | ||
</Icon> | ||
</Button> | ||
</PopoverTrigger> | ||
<PopoverContent className="w-80"> | ||
<div className="grid gap-4"> | ||
<div className="space-y-2"> | ||
<h4 className="font-medium leading-none">Size</h4> | ||
<p className="text-sm text-muted-foreground"> | ||
Settings for this size. | ||
</p> | ||
</div> | ||
<div className="grid gap-2"> | ||
<div className="grid grid-cols-3 items-center gap-4"> | ||
<Label htmlFor="format">Format</Label> | ||
<Input | ||
id="format" | ||
defaultValue={size.format} | ||
className="col-span-2 h-8" | ||
disabled | ||
/> | ||
</div> | ||
<div className="grid grid-cols-3 items-center gap-4"> | ||
<Label htmlFor="value">Value</Label> | ||
<Input | ||
id="value" | ||
defaultValue={size.value} | ||
className="col-span-2 h-8" | ||
disabled | ||
/> | ||
</div> | ||
<div className="grid grid-cols-3 items-center gap-4"> | ||
<Label htmlFor="basis">Basis</Label> | ||
<Input | ||
id="basis" | ||
defaultValue={size.basis} | ||
className="col-span-2 h-8" | ||
disabled | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</PopoverContent> | ||
</Popover> | ||
</div> | ||
) | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.