frintjs/frint

frint-react: Empty Component when Region is empty

Open

#216 ouverte le 2 juin 2017

Voir sur GitHub
 (3 commentaires) (1 réaction) (0 assignés)JavaScript (37 forks)batch import
featuregood first issuehelp wantedminor

Métriques du dépôt

Stars
 (746 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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.

Guide contributeur