Repository navigation
feat(layout): symmetric header padding variant #18328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,11 +31,8 @@ | |
| </nav> | ||
|
|
||
| <div class="flex flex-col overflow-hidden bg-base-background"> | ||
| <header | ||
| v-if="$slots.header" | ||
| class="flex h-18 w-full items-center justify-between gap-2 px-6" | ||
| > | ||
| <div class="flex min-w-0 flex-1 gap-2"> | ||
| <header v-if="$slots.header" :class="headerClass"> | ||
| <div :class="headerContentClass"> | ||
| <Button | ||
| v-if="!notMobile && !showLeftPanel" | ||
| size="lg" | ||
|
|
@@ -155,20 +152,23 @@ const SIZE_CLASSES = { | |
|
|
||
| type ModalSize = keyof typeof SIZE_CLASSES | ||
| type ContentPadding = 'default' | 'compact' | 'none' | ||
| type HeaderPadding = 'default' | 'symmetric' | ||
|
|
||
| const { | ||
| contentTitle, | ||
| rightPanelTitle, | ||
| size = 'lg', | ||
| leftPanelWidth = '14rem', | ||
| contentPadding = 'default', | ||
| headerPadding = 'default', | ||
| closeButtonVariant | ||
| } = defineProps<{ | ||
| contentTitle: string | ||
| rightPanelTitle?: string | ||
| size?: ModalSize | ||
| leftPanelWidth?: string | ||
| contentPadding?: ContentPadding | ||
| headerPadding?: HeaderPadding | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 Low — The new
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Intentional: the consumer is #18319, which is stacked on this PR. |
||
| closeButtonVariant?: ButtonVariants['variant'] | ||
| }>() | ||
|
|
||
|
|
@@ -205,6 +205,20 @@ const showLeftPanel = computed(() => { | |
| return shouldShow | ||
| }) | ||
|
|
||
| const headerClass = computed(() => | ||
| cn( | ||
| 'flex w-full items-center justify-between gap-2', | ||
| headerPadding === 'symmetric' ? 'px-6 py-5' : 'h-18 px-6' | ||
| ) | ||
| ) | ||
|
|
||
| const headerContentClass = computed(() => | ||
| cn( | ||
| 'flex min-w-0 flex-1 gap-2', | ||
| headerPadding === 'symmetric' && 'min-h-10 items-center' | ||
| ) | ||
| ) | ||
|
|
||
| const contentContainerClass = computed(() => | ||
| cn( | ||
| 'flex scrollbar-custom min-h-0 flex-1 flex-col overflow-y-auto', | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.