File tree 4 files changed +62
-5
lines changed
4 files changed +62
-5
lines changed Original file line number Diff line number Diff line change
1
+ <div class =" layout-container" >
2
+ <aside class =" side-bar h-full" >
3
+ <slot name =" side-bar" />
4
+ </aside >
5
+ <div class =" main-content" ><slot name =" main-content" /></div >
6
+ </div >
7
+
8
+ <style >
9
+ .layout-container {
10
+ height : 100% ;
11
+ display : grid ;
12
+ grid-template-columns : 400px auto ;
13
+ }
14
+ .main-content {
15
+ flex-grow : 1 ;
16
+ height : 100% ;
17
+ }
18
+
19
+ .side-bar {
20
+ position : relative ;
21
+ width : 400px ;
22
+ }
23
+
24
+ aside {
25
+ overflow-y : auto ;
26
+ }
27
+ </style >
Original file line number Diff line number Diff line change
1
+ <script lang =" ts" >
2
+ import { Button , List } from ' stwui' ;
3
+
4
+ export let tenants;
5
+ </script >
6
+
7
+ {#if tenants }
8
+ <div class =" h-full" >
9
+ <List divided ={false }>
10
+ {#each tenants as tenant }
11
+ <List .Item class =" m-2 rounded-md py-0" >
12
+ <Button class ="flex w-full justify-start" on:click ={() => alert (' TODO' )}>
13
+ {tenant .name }
14
+ </Button >
15
+ </List .Item >
16
+ {/each }
17
+ </List >
18
+ </div >
19
+ {/if }
Original file line number Diff line number Diff line change
1
+ <script lang =" ts" >
2
+ import SideBarMainContentLayout from ' $lib/components/SideBarMainContentLayout/SideBarMainContentLayout.svelte' ;
3
+ </script >
4
+
5
+ <SideBarMainContentLayout >
6
+ <slot slot =" side-bar" />
7
+ <div slot =" main-content" class =" relative flex h-full" id =" main-content" ></div >
8
+ </SideBarMainContentLayout >
9
+
10
+ <style >
11
+ #main-content {
12
+ background-color : hsl (var (--background ));
13
+ }
14
+ </style >
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import { useUnityAuthContext } from ' $lib/context/UnityAuthContext' ;
3
+ import Tenants from ' $lib/components/Tenants/Tenants.svelte' ;
3
4
4
5
const unityAuthContext = useUnityAuthContext ();
5
6
const user = unityAuthContext .user ;
6
7
</script >
7
8
8
9
{#if $user && $user .tenants }
9
- <ul >
10
- {#each $user .tenants as tenant }
11
- <li >{tenant .name }</li >
12
- {/each }
13
- </ul >
10
+ <Tenants tenants ={$user .tenants } />
14
11
{/if }
You can’t perform that action at this time.
0 commit comments