frintjs/frint

frint-react: Empty Component when Region is empty

Open

#216 opened on Jun 2, 2017

View on GitHub
 (3 comments) (1 reaction) (0 assignees)JavaScript (746 stars) (37 forks)batch import
featuregood first issuehelp wantedminor

Description

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.

Contributor guide