-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8bfaec8
commit ff9e191
Showing
8 changed files
with
153 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule chat
updated
3 files
+1 −1 | es/components/molecules/Chat.js | |
+1 −0 | es/components/molecules/Rooms.js | |
+15 −3 | es/components/molecules/message/Message.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
// @ts-check | ||
import { Shadow } from '../../../event-driven-web-components-prototypes/src/Shadow.js' | ||
|
||
/** | ||
* Scroll of decentral ninja | ||
* | ||
* @export | ||
* @class Scroll | ||
* @type {CustomElementConstructor} | ||
* @attribute { | ||
* {string} src used for the image source | ||
* {string} href used for the link reference | ||
* } | ||
*/ | ||
export default class Scroll extends Shadow() { | ||
constructor (options = {}, ...args) { | ||
super({ importMetaUrl: import.meta.url, ...options }, ...args) | ||
} | ||
|
||
connectedCallback () { | ||
super.connectedCallback() | ||
if (this.shouldRenderCSS()) this.renderCSS() | ||
if (this.shouldRenderHTML()) this.renderHTML() | ||
} | ||
|
||
/** | ||
* evaluates if a render is necessary | ||
* | ||
* @return {boolean} | ||
*/ | ||
shouldRenderCSS () { | ||
return !this.root.querySelector(`:host > style[_css], ${this.tagName} > style[_css]`) | ||
} | ||
|
||
/** | ||
* evaluates if a render is necessary | ||
* | ||
* @return {boolean} | ||
*/ | ||
shouldRenderHTML () { | ||
return !this.aIconMdx | ||
} | ||
|
||
/** | ||
* renders the css | ||
* | ||
* @return {void} | ||
*/ | ||
renderCSS () { | ||
this.css = /* css */` | ||
:host > div { | ||
display: flex; | ||
background-color: var(--color-secondary); | ||
border: 2px solid var(--color-secondary); | ||
border-radius: 50%; | ||
padding: 0.25em; | ||
transition: background-color .3s ease-out; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
:host(.hover) > div, :host(:hover) > div { | ||
background-color: var(--background-color); | ||
} | ||
:host > div > a-icon-mdx { | ||
color: var(--background-color); | ||
transform: translateY(0.25em); | ||
transition: color .3s ease-out; | ||
height: auto; | ||
width: 100%; | ||
} | ||
:host(.hover) > div > a-icon-mdx, :host(:hover) > div > a-icon-mdx { | ||
color: var(--color-hover); | ||
} | ||
` | ||
} | ||
|
||
/** | ||
* renders the html | ||
* | ||
* @return {void} | ||
*/ | ||
renderHTML () { | ||
this.html = '' | ||
// https://tabler-icons.io/ | ||
this.html = /* html */`<div><a-icon-mdx hover-on-parent-element id="show-modal" icon-url="../../../../../../img/icons/swipe-down.svg" size="2em"></a-icon-mdx></div>` | ||
} | ||
|
||
get aIconMdx () { | ||
return this.root.querySelector('a-icon-mdx') | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule web-components-toolbox
updated
5 files
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.