@magicbell/magicbell-react
Version:
React components for building a notification inbox for your app
13 lines • 403 B
JavaScript
import React from 'react';
/**
* Component to sort the children based on the `order` property.
*
* @example
* <Layout order={['footer']}>
* <p key="footer">Settings</p>
* </Layout>
*/
export default function Layout({ order, children }) {
return React.createElement(React.Fragment, null, order.map((key) => children.find((child) => child?.key === key)));
}
//# sourceMappingURL=Layout.js.map