frintjs/frint

frint-react: Empty Component when Region is empty

Open

#216 创建于 2017年6月2日

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

仓库指标

Star
 (746 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南