Skip to content

Commit

Permalink
Rename component with Bento prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
caroqliu committed Sep 16, 2021
1 parent 9cd8ee7 commit eac6bc9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions extensions/amp-soundcloud/1.0/base-element.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {PreactBaseElement} from '#preact/base-element';

import {Soundcloud} from './component';
import {BentoSoundcloud} from './component';

export class BaseElement extends PreactBaseElement {
/** @override */
Expand All @@ -10,7 +10,7 @@ export class BaseElement extends PreactBaseElement {
}

/** @override */
BaseElement['Component'] = Soundcloud;
BaseElement['Component'] = BentoSoundcloud;

/** @override */
BaseElement['props'] = {
Expand Down
6 changes: 3 additions & 3 deletions extensions/amp-soundcloud/1.0/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const MATCHES_MESSAGING_ORIGIN = (origin) => {
};

/**
* @param {!SoundcloudDef.Props} props
* @param {!BentoSoundcloudDef.Props} props
* @return {PreactDef.Renderable}
*/
export function Soundcloud({
export function BentoSoundcloud({
color,
onLoad,
playlistId,
Expand Down Expand Up @@ -67,7 +67,7 @@ export function Soundcloud({
// Extract Media ID
const mediaId = trackId ?? playlistId;

// Prepare Soundcloud Widget URL for iFrame
// Prepare BentoSoundcloud Widget URL for iFrame
let iframeSrc =
'https://w.soundcloud.com/player/?' +
'url=' +
Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-soundcloud/1.0/component.type.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @externs */

/** @const */
var SoundcloudDef = {};
var BentoSoundcloudDef = {};

/**
* @typedef {{
Expand All @@ -13,4 +13,4 @@ var SoundcloudDef = {};
* onLoad: (function():undefined|undefined),
* }}
*/
SoundcloudDef.Props;
BentoSoundcloudDef.Props;
8 changes: 4 additions & 4 deletions extensions/amp-soundcloud/1.0/storybook/Basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import * as Preact from '#preact';

import {rgba2hex} from './converter';

import {Soundcloud} from '../component';
import {BentoSoundcloud} from '../component';

export default {
title: 'Soundcloud',
component: Soundcloud,
component: BentoSoundcloud,
decorators: [withKnobs],
};

Expand All @@ -23,7 +23,7 @@ export const track = () => {

// Render Preact Component
return (
<Soundcloud
<BentoSoundcloud
color={hex}
style={{height: '240px'}}
trackId={trackid}
Expand All @@ -43,7 +43,7 @@ export const playlist = () => {

// Render Preact Component
return (
<Soundcloud
<BentoSoundcloud
color={hex}
style={{height: '240px'}}
playlistId={playlistid}
Expand Down

0 comments on commit eac6bc9

Please sign in to comment.