frintjs/frint

frint-react: Empty Component when Region is empty

Open

#216 aperta il 2 giu 2017

Vedi su GitHub
 (3 commenti) (1 reazione) (0 assegnatari)JavaScript (37 fork)batch import
featuregood first issuehelp wantedminor

Metriche repository

Star
 (746 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor