Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | import React from "react"; import Info from "./Info.tsx"; import SettingsTitle from "./SettingsTitle.tsx"; type Section = { label: string; value: string; }; type SettingsSectionPropTypes = { title: string; sections?: Section[]; }; function SettingsSection({ title, sections }: SettingsSectionPropTypes) { return ( <section className="border-b pb-4 mb-4"> <SettingsTitle title={title} /> <div className="mt-2 flex flex-col gap-2"> {sections?.map(({ label, value }, index) => ( <Info key={index} label={label} value={value} /> ))} </div> </section> ); } export default SettingsSection; |