made window
This commit is contained in:
parent
2e77b84df3
commit
f9b8428d2b
6 changed files with 67 additions and 14 deletions
26
src/components/Window.astro
Normal file
26
src/components/Window.astro
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
const {title, showClose, maxWidth} = Astro.props
|
||||
---
|
||||
|
||||
<style define:vars={{ maxWidth }}>
|
||||
#window {
|
||||
max-width: var(--maxWidth);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="background" id="window">
|
||||
<div class="window glass active" style="max-width: 100%">
|
||||
<div class="title-bar">
|
||||
<div class="title-bar-text">{title}</div>
|
||||
{
|
||||
showClose &&
|
||||
<div class="title-bar-controls">
|
||||
<button aria-label="Close"></button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="window-body has-space">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue