Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesealey committed Nov 26, 2024
1 parent dd06d5b commit ddae43c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
1 change: 1 addition & 0 deletions packages/bbui/src/Typography/Heading.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<style>
h1 {
font-family: var(--font-accent);
border: 1px solid blue;
}
h1 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
{ value: "Center", barIcon: "TextAlignCenter" },
{ value: "Right", barIcon: "TextAlignRight" },
]
const alignLogoOptions = [
{ value: "Left", barIcon: "AlignLeft" },
{ value: "Center", barIcon: "AlignCenter" },
{ value: "Right", barIcon: "AlignRight" },
]
const widthOptions = ["Max", "Large", "Medium", "Small"]
const logoSizeOptions = ["18px", "24px", "36px", "48px", "72px", "96px"]
Expand Down Expand Up @@ -190,6 +195,24 @@
appendBindingsAsOptions: false,
}}
/>
<PropertyControl
label="Logo alignment"
control={BarButtonList}
onChange={logoAlign => update("logoAlign", logoAlign)}
value={$nav.logoAlignment}
props={{
options: alignLogoOptions,
}}
/>
<!-- label="Text align"
control={BarButtonList}
onChange={align => update("textAlign", align)}
value={$nav.textAlign}
props={{
options: alignmentOptions,
}} -->
<PropertyControl
label="Logo link URL"
control={DrawerBindableCombobox}
Expand Down
16 changes: 7 additions & 9 deletions packages/client/src/components/app/Layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
export let openLogoLinkInNewTab
export let textAlign
export let textBelow
export let logoAlign
export let embedded = false
const NavigationClasses = {
Expand Down Expand Up @@ -253,7 +254,8 @@
: '95%'};
align-items: {navigation === 'Left' ? 'center' : 'left'};"
>
<div>
<div style="text-align: {logoAlign};">
<p>{logoAlign}</p>
{#if !hideLogo}
{#if logoLinkUrl && isInternal(logoLinkUrl) && !openLogoLinkInNewTab}
<a
Expand All @@ -266,7 +268,8 @@
<img
src={logoUrl || "/builder/bblogo.png"}
alt={title}
style="--logo-size: {logoSize};"
style="--logo-size: {logoSize};
align"
/>
</a>
{:else if logoLinkUrl}
Expand All @@ -293,11 +296,7 @@
{/if}
</div>
{#if !hideTitle && title}
<Heading
size="S"
{textAlign}
style="width: {textBelow ? '100%' : ''}; ">{title}</Heading
>
<Heading size="S" {textAlign} style="">{title}</Heading>
{/if}
</div>
{#if !embedded}
Expand Down Expand Up @@ -565,8 +564,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
border: 2px solid blue;
max-width: 100%;
width: 100%;
}
.portal {
display: grid;
Expand Down

0 comments on commit ddae43c

Please sign in to comment.