Skip to content

Commit

Permalink
fix(Layout): added class identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
N00nDay committed Oct 4, 2023
1 parent b6ca6f1 commit 55de987
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/layout/Body.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { twMerge } from 'tailwind-merge';
import { getContext } from 'svelte/internal';
import { getContext } from 'svelte';
import type { Writable } from 'svelte/store';
import { get_current_component } from 'svelte/internal';
import { forwardEventsBuilder, useActions, type ActionArray } from '../../actions';
Expand All @@ -10,7 +10,7 @@
const collapsed: Writable<boolean> = getContext('layout-collapsed');
const defaultClass = 'w-full h-full';
const defaultClass = 'w-full h-full stwui-layout-body';
const collapsedClass = 'lg:pl-0';
$: finalClass = twMerge(
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/layout/Content.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { setContext } from 'svelte/internal';
import { setContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import { writable } from 'svelte/store';
import { get_current_component } from 'svelte/internal';
Expand All @@ -20,7 +20,7 @@
$: cWidth.set(collapsedWidth);
$: eWidth.set(expandedWidth);
const defaultClass = 'flex flex-row w-full h-full items-start justify-start';
const defaultClass = 'flex flex-row w-full h-full items-start justify-start stwui-layout-content';
$: finalClass = twMerge(defaultClass, $$props.class);
setContext('layout-collapsed', sidebarCollapsed);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/layout/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const forwardEvents = forwardEventsBuilder(get_current_component());
const defaultClass =
'flex pb-[var(--sab)] z-10 pl-[calc(var(--sal)+1rem)] pr-[calc(var(--sar)+1rem)] w-full flex-row h-16 min-h-[64px] flex-shrink items-center bg-surface text-content shadow-md flex-1';
'flex pb-[var(--sab)] z-10 pl-[calc(var(--sal)+1rem)] pr-[calc(var(--sar)+1rem)] w-full flex-row h-16 min-h-[64px] flex-shrink items-center bg-surface text-content shadow-md flex-1 stwui-layout-footer';
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/layout/FooterExtra.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { exclude } from '../../utils/exclude';
const forwardEvents = forwardEventsBuilder(get_current_component());
const defaultClass = 'flex-grow flex flex-row items-center justify-end';
const defaultClass = 'flex-grow flex flex-row items-center justify-end stwui-layout-footer-extra';
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/layout/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const forwardEvents = forwardEventsBuilder(get_current_component());
const defaultClass =
'flex sticky top-[var(--sat)] z-10 pt-3 pb-2 pl-[calc(var(--sal)+1rem)] pr-[calc(var(--sar)+1rem)] w-full flex-row h-16 min-h-[64px] max-h-16 flex-shrink items-center bg-surface text-content shadow-md flex-1';
'flex sticky top-[var(--sat)] z-10 pt-3 pb-2 pl-[calc(var(--sal)+1rem)] pr-[calc(var(--sar)+1rem)] w-full flex-row h-16 min-h-[64px] max-h-16 flex-shrink items-center bg-surface text-content shadow-md flex-1 stwui-layout-header';
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/layout/HeaderExtra.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { exclude } from '../../utils/exclude';
const forwardEvents = forwardEventsBuilder(get_current_component());
const defaultClass = 'flex-grow flex flex-row items-center justify-end';
const defaultClass = 'flex-grow flex flex-row items-center justify-end stwui-layout-header-extra';
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/layout/Layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
}
const defaultClass = 'w-full h-full flex flex-col';
const defaultClass = 'w-full h-full flex flex-col stwui-layout';
$: finalClass = twMerge(defaultClass, $$props.class);
setContext('sideBarWidth', sideBarWidth);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/layout/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
const collapsedWidth: Writable<string> = getContext('collapsedWidth');
const expandedWidth: Writable<string> = getContext('expandedWidth');
const defaultClass = 'hidden h-full lg:flex lg:flex-shrink-0 relative';
const defaultClass = 'hidden h-full lg:flex lg:flex-shrink-0 relative stwui-layout-sidebar';
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

Expand Down

0 comments on commit 55de987

Please sign in to comment.