UNPKG

@magicbell/magicbell-react

Version:

React components for building a notification inbox for your app

17 lines 577 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Layout; const tslib_1 = require("tslib"); const react_1 = tslib_1.__importDefault(require("react")); /** * Component to sort the children based on the `order` property. * * @example * <Layout order={['footer']}> * <p key="footer">Settings</p> * </Layout> */ function Layout({ order, children }) { return react_1.default.createElement(react_1.default.Fragment, null, order.map((key) => children.find((child) => child?.key === key))); } //# sourceMappingURL=Layout.js.map