import React from 'react'; interface LayoutProps { order: string[]; children: React.ReactNode[]; } /** * Component to sort the children based on the `order` property. * * @example * *

Settings

*
*/ export default function Layout({ order, children }: LayoutProps) { return <>{order.map((key) => children.find((child: React.ReactElement) => child?.key === key))}; }