Stable version

This commit is contained in:
Belen Curcio
2017-03-28 14:20:12 -03:00
parent 697d2f0ec1
commit 1a115e4f2c
4 changed files with 10 additions and 22 deletions
+1 -2
View File
@@ -19,7 +19,6 @@ import FlagComment from 'coral-plugin-flags/FlagComment';
import LikeButton from 'coral-plugin-likes/LikeButton';
import {BestButton, IfUserCanModifyBest, BEST_TAG, commentIsBest, BestIndicator} from 'coral-plugin-best/BestButton';
import LoadMore from 'coral-embed-stream/src/LoadMore';
import Pluggable from './Pluggable';
import {Slot} from 'coral-framework';
import styles from './Comment.css';
@@ -193,8 +192,8 @@ class Comment extends React.Component {
removeBest={removeBestTag} />
</IfUserCanModifyBest>
</ActionButton>
<Slot fill="Comment.Detail" />
</div>
<Pluggable/>
<div className="commentActionsRight comment__action-container">
<ActionButton>
<PermalinkButton articleURL={asset.url} commentId={comment.id} />
@@ -1,14 +0,0 @@
import React from 'react';
import injectedPlugins from 'coral-framework/helpers/importer';
export default function pluginContainer () {
return (
<div>
{
Object.keys(injectedPlugins).map((component, i) => {
return injectedPlugins[component]({key: i});
})
}
</div>
);
}
+6 -3
View File
@@ -1,12 +1,15 @@
import React, {Component} from 'react';
// { "slot": "Comment.DetailArea"},
import injectedPlugins from 'coral-framework/helpers/importer';
class Slot extends Component {
componentDidMount() {
console.log('Slot Mounted');
}
render() {
const {slot} = this.props;
return (
<div>
This is a slot
{injectedPlugins}
</div>
);
}
+3 -3
View File
@@ -1,6 +1,6 @@
import {client as clientPlugins} from 'pluginsConfig';
function importer () {
function importer (slot) {
let context,
importedFiles;
@@ -66,9 +66,9 @@ function importer () {
return filterByUserConfig(importedFiles)
.filter(key => key.format === 'js')
.reduce((entry, plugin) => {
entry[plugin.name] = () => context(plugin.key)(getConfig(plugin.name));
entry.push(context(plugin.key)(getConfig(plugin.name)))
return entry;
}, {});
}, []);
}
return init();