-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* export all facebook comps * export all embedly-card comps * install pagination css for inline-gallery * remove style because they're not necessary anymore * implement base amp facebook mixin to support multiple inheritance from AmpFacebook and Base Facebook Elements
- Loading branch information
Showing
9 changed files
with
179 additions
and
82 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import {defineElement} from './web-component'; | ||
defineElement(); |
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,5 @@ | ||
import {PreactBaseElement} from '#preact/base-element'; | ||
|
||
export const BENTO_TAG = 'bento-embedly-key'; | ||
|
||
export class EmbedlyKeyBaseElement extends PreactBaseElement {} |
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,23 @@ | ||
import {BENTO_TAG, BaseElement} from './base-element'; | ||
import { | ||
BENTO_TAG as EMBEDLY_KEY_BENTO_TAG, | ||
EmbedlyKeyBaseElement, | ||
} from './key-base-element'; | ||
|
||
/** | ||
* Registers `<bento-embedly-card> component to CustomElements registry | ||
*/ | ||
export function defineElement() { | ||
customElements.define(BENTO_TAG, BaseElement.CustomElement(BaseElement)); | ||
defineElementEmbedlyKey(); | ||
} | ||
|
||
/** | ||
* Registers <bento-embedly-key>` component to CustomElements registry | ||
*/ | ||
export function defineElementEmbedlyKey() { | ||
customElements.define( | ||
EMBEDLY_KEY_BENTO_TAG, | ||
EmbedlyKeyBaseElement.CustomElement(EmbedlyKeyBaseElement) | ||
); | ||
} |
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
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,2 @@ | ||
import {defineElement} from './web-component'; | ||
defineElement(); |
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,51 @@ | ||
import { | ||
BaseElement, | ||
COMMENTS_TAG, | ||
CommentsBaseElement, | ||
LIKE_TAG, | ||
LikeBaseElement, | ||
PAGE_TAG, | ||
PageBaseElement, | ||
TAG, | ||
} from './base-element'; | ||
|
||
/** | ||
*Register BentoFacebook component to CustomElements registry | ||
*/ | ||
export function defineElement() { | ||
customElements.define(TAG, BaseElement.CustomElement(BaseElement)); | ||
|
||
defineCommentsElement(); | ||
defineLikeElement(); | ||
definePageElement(); | ||
} | ||
|
||
/** | ||
* Register BentoFacebookComments component to CustomElements registry | ||
*/ | ||
export function defineCommentsElement() { | ||
customElements.define( | ||
COMMENTS_TAG, | ||
CommentsBaseElement.CustomElement(CommentsBaseElement) | ||
); | ||
} | ||
|
||
/** | ||
* Register BentoFacebook component to CustomElements registry | ||
*/ | ||
export function defineLikeElement() { | ||
customElements.define( | ||
LIKE_TAG, | ||
LikeBaseElement.CustomElement(LikeBaseElement) | ||
); | ||
} | ||
|
||
/** | ||
* Register BentoFacebook component to CustomElements registry | ||
*/ | ||
export function definePageElement() { | ||
customElements.define( | ||
PAGE_TAG, | ||
PageBaseElement.CustomElement(PageBaseElement) | ||
); | ||
} |