From 7a76a22ea19ce0c9043411efd27afae33a036712 Mon Sep 17 00:00:00 2001 From: Beau Smith Date: Thu, 5 Apr 2018 09:58:46 -0700 Subject: [PATCH] Pass non-Remarkable props down to the Container. Inspired by: https://github.com/acdlite/react-remarkable/pull/30 --- src/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 46c7336..63d8bf0 100644 --- a/src/index.js +++ b/src/index.js @@ -6,10 +6,14 @@ import Markdown from 'remarkable'; class Remarkable extends React.Component { render() { - var Container = this.props.container; + var { + container: Container, + children, options, source, // ⬅ remove Remarkable props + ...props // ⬅ only pass non-Remarkable props + } = this.props; return ( - + {this.content()} );