frintjs/frint

frint-react: Empty Component when Region is empty

Open

#216 创建于 2017年6月2日

在 GitHub 查看
 (3 评论) (1 反应) (0 负责人)JavaScript (746 star) (37 fork)batch import
featuregood first issuehelp wantedminor

描述

Current situation

Right now, when a Region has no Apps to render, it just remains empty.

It would be useful if we can pass some default Component to render in those cases.

Proposed API

import EmptyRegionContent from '../components/EmptyRegionContent';

<Region name="sidebar" empty={EmptyRegionContent} />

If the sidebar region is empty, it would render EmptyRegionContent component by default.

贡献者指南

frint-react: Empty Component when Region is empty · frintjs/frint#216 | Good First Issue