diff options
author | Manurbhav Arya | 2024-06-28 13:21:21 +0530 |
---|---|---|
committer | Manurbhav Arya | 2024-06-28 13:21:21 +0530 |
commit | 5377a121b57a3c7edeb9cee318f4fd0dd4d67127 (patch) | |
tree | 93f857e46327087f6aa66c4bd1d97b3003d5d29f | |
parent | ebb38eb5a1c1a500bacbb0d054f63e4bfbbc20aa (diff) | |
download | astro-npm-packages-5377a121b57a3c7edeb9cee318f4fd0dd4d67127.tar.gz astro-npm-packages-5377a121b57a3c7edeb9cee318f4fd0dd4d67127.tar.bz2 astro-npm-packages-5377a121b57a3c7edeb9cee318f4fd0dd4d67127.zip |
-rw-r--r-- | src/Accordion.astro | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/Accordion.astro b/src/Accordion.astro index e222b05..aef911a 100644 --- a/src/Accordion.astro +++ b/src/Accordion.astro @@ -1,13 +1,14 @@ --- -// var accordionContent = await Astro.glob("../content/resourcesPage/*.md"); - + // for json interface IBody{ text: string; link?: string } +const {heading, body} = Astro.props as { heading: string; body: IBody[];}; + +// for markdown -// const {heading, body} = Astro.props as { heading: string; body: IBody[];}; -const {heading, Content} = Astro.props; +// const {heading, Content} = Astro.props; --- <section> <div class="faq"> @@ -19,18 +20,17 @@ const {heading, Content} = Astro.props; </div> <div class="answer"> { - - // body.map((item, index) => { - // return( - // <ul> - // <li> - // <a href={item.link}> - // {item.text} - // </a> - // </li> - // </ul> - // ) - // }) + body.map((item, index) => { + return( + <ul> + <li> + <a href={item.link}> + {item.text} + </a> + </li> + </ul> + ) + }) } </div> </div> |