mirror of
https://github.com/wassname/talk.git
synced 2026-07-10 06:29:01 +08:00
Ádding PropTypes to Slot
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import React, {Component} from 'react';
|
||||
import {getSlotElements} from 'coral-framework/helpers/plugins';
|
||||
import React, { Component } from "react";
|
||||
import { getSlotElements } from "coral-framework/helpers/plugins";
|
||||
|
||||
class Slot extends Component {
|
||||
render() {
|
||||
const {fill, ...rest} = this.props;
|
||||
const { fill, ...rest } = this.props;
|
||||
return (
|
||||
<div>
|
||||
{getSlotElements(fill, rest)}
|
||||
@@ -12,4 +12,8 @@ class Slot extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
Slot.propTypes = {
|
||||
fill: React.PropTypes.string
|
||||
};
|
||||
|
||||
export default Slot;
|
||||
|
||||
Reference in New Issue
Block a user