feat(blocksAntd): add method call button to Examples

This commit is contained in:
Gervwyk 2020-11-18 18:12:00 +02:00
parent 82d27c1313
commit 4fdee9b12f

View File

@ -84,14 +84,14 @@ const Examples = ({ type, Component }) => {
)}
{meta.test &&
meta.test.methods &&
meta.test.methods.map((method) => (
meta.test.methods.map((method, i) => (
<button
key={method}
key={i}
onClick={() => {
block.registeredMethods[method]();
block.registeredMethods[method.name](method.args);
}}
>
{method}
{method.name}
</button>
))}
</div>