frintjs/frint

frint-react: Empty Component when Region is empty

開放

#216 建立於 2017年6月2日

 (3 則留言) (1 個反應) (0 位負責人)JavaScript (37 個分叉)batch import
featuregood first issuehelp wantedminor

倉庫指標

星標
 (746 顆星)
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.

貢獻者指南