tabs: more configurable content padding options
choice between margin and padding. ngl, this feels kind of dumb, it wasn't be problem and I don't know when it would ever be a problem. perhaps i'll simplify or revert this later.
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
/** Applies layout padding to the tab header (default: false) */
|
||||
padHeader?: boolean;
|
||||
/** Applies layout padding to the content areas (default: false) */
|
||||
padContent?: boolean;
|
||||
padContent?: 'padding' | 'margin' | 'none';
|
||||
/** Additional classes applied to the outer container */
|
||||
class?: ClassValue | null;
|
||||
}
|
||||
@@ -36,7 +36,7 @@
|
||||
activeIndex = 0,
|
||||
onchange,
|
||||
padHeader = false,
|
||||
padContent = false,
|
||||
padContent = 'none',
|
||||
class: classValue
|
||||
}: Props = $props();
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
{#key activeIndex}
|
||||
<div
|
||||
class={[padContent && 'px-layout']}
|
||||
class={[padContent === 'padding' && 'px-layout', padContent === 'margin' && 'mx-layout']}
|
||||
in:flyX={{ direction: activeIndex > prevIndex ? 1 : -1, duration: 180, delay: 181 }}
|
||||
out:flyX={{ direction: activeIndex > prevIndex ? -1 : 1, duration: 180 }}
|
||||
onoutrostart={lockHeight}
|
||||
|
||||
Reference in New Issue
Block a user