Skip to content

Commit

Permalink
clean up sheets a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
phernandez committed Oct 28, 2024
1 parent 2f9ac84 commit ce1963c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
5 changes: 2 additions & 3 deletions components/ui/Sheet.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{#def
id: str = "sheet",
className: str = "",
#}
<!-- Sheet -->
<div x-data="{ open: false }" {{ attrs.render() }}>{{ content }}</div>
<div x-data="{ open: false }" {{ attrs.render() }} class="{{ className }}">{{ content }}</div>
2 changes: 0 additions & 2 deletions components/ui/SheetClose.jinja
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{#def
id: str = "sheet-close",
className: str = "",
#}
<!-- SheetClose -->
<button
type="button"
@click="open = false"
Expand Down
1 change: 0 additions & 1 deletion components/ui/SheetContent.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
className: str = "",
#}
<SheetOverlay/>
<!-- SheetContent -->
<div
x-show="open"
@keydown.escape.window="open = false"
Expand Down
1 change: 0 additions & 1 deletion components/ui/SheetTrigger.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{#def
className: str = "",
#}
<!-- SheetTrigger -->
<div @click="open = true" class="inline-block {{ className }}">{{ content }}</div>
10 changes: 4 additions & 6 deletions documentation/docs/components/sheet.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sheet

Extends the Dialog component to display content that complements the main content of the screen.
Displays content one side of the screen in a modal dialog.

## Preview

Expand All @@ -9,16 +9,14 @@ src="{{ preview_url}}/components/Sheet"
style="width: 100%; height: 400px; border: none;">
</iframe>

The value of the Sheeted item is stored in a hidden input field.

## Props

| Component | Prop | Type | Default | Description |
|------------------|-------------|--------|-------------------|------------------------------------------------|
| Sheet | `id` | String | `"sheet"` | Unique identifier for the sheet component. |
| SheetClose | `id` | String | `"sheet-close"` | Unique identifier for the close button. |
| Sheet | `className` | String | `"sheet"` | Additional CSS classes for customization. |
| SheetClose | `className` | String | `"sheet-close"` | Additional CSS classes for customization. |
| SheetClose | `className` | String | `""` | Additional CSS classes for customization. |
| SheetContent | `id` | String | `"sheet-content"` | Unique identifier for the content. |
| SheetContent | `className` | String | `"sheet-content"` | Additional CSS classes for customization. |
| SheetContent | `side` | String | `"right"` | Position of the sheet (top/bottom/left/right). |
| SheetContent | `className` | String | `""` | Additional CSS classes for customization. |
| SheetDescription | `className` | String | `""` | Additional CSS classes for customization. |
Expand Down

0 comments on commit ce1963c

Please sign in to comment.