mirror of
https://github.com/wassname/talk.git
synced 2026-07-03 13:28:50 +08:00
21 lines
444 B
JavaScript
21 lines
444 B
JavaScript
import React, {Component} from 'react';
|
|
import {getSlotElements} from 'coral-framework/helpers/plugins';
|
|
import styles from './Slot.css';
|
|
|
|
class Slot extends Component {
|
|
render() {
|
|
const {fill, inline = false, ...rest} = this.props;
|
|
return (
|
|
<div className={inline ? styles.inline : ''}>
|
|
{getSlotElements(fill, rest)}
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
Slot.propTypes = {
|
|
fill: React.PropTypes.string
|
|
};
|
|
|
|
export default Slot;
|