Skip to content

feature: UIKit - logo: replaced ratio property #1111 #1112

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

Merged
merged 3 commits into from
Dec 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-unused-vars, no-param-reassign */
import { store } from '../../store.js'; // connect to redux
import { ifDefined } from 'lit-html/directives/if-defined';
import { html } from 'lit-html';
import { BaseLitComponent } from '../../components/base-component';
import { customElement } from 'lit-element';
Expand Down Expand Up @@ -116,7 +117,8 @@ class Header extends BaseLitComponent {
: window.config?.theme?.logo?.url || '/'}"
alt-text="${window.config?.theme?.logo?.altText || ''}"
theme="${this.themeMode}"
ratio="${window.config?.theme?.logo?.ratio || ''}"
width="${ifDefined(window.config?.theme?.logo?.width)}"
height="${ifDefined(window.config?.theme?.logo?.height)}"
text="${window.config?.theme?.logo?.text === '' ||
window.config?.theme?.logo?.text === false ||
window.config?.theme?.logo?.text === 'none'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { store } from '../../store.js'; // connect to redux
import { ifDefined } from 'lit-html/directives/if-defined';
import { html } from 'lit-html';
import { customElement } from 'lit-element';
import { BaseLitComponent } from '../../components/base-component';
Expand All @@ -20,7 +21,8 @@ class Logo extends BaseLitComponent {

static get properties() {
return {
ratio: String,
width: String,
height: String,
theme: String,
url: String,
text: String,
Expand Down Expand Up @@ -48,6 +50,8 @@ class Logo extends BaseLitComponent {
alt=${this.altText || 'Pattern Lab Logo'}
src=${imageSrc}
class="pl-c-logo__img"
width="${ifDefined(this.width)}"
height="${ifDefined(this.height)}"
/>
${this.text && this.text !== ''
? html`
Expand Down