summaryrefslogtreecommitdiff
path: root/docs/src/components/codes/Footnotes.jsx
blob: b382141f81d0f1a174fc55167a526230a3974cae (plain)
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
30
/*
 * Copyright (c) 2020 The ZMK Contributors
 *
 * SPDX-License-Identifier: CC-BY-NC-SA-4.0
 */

import React from "react";
import PropTypes from "prop-types";
import Footnote from "./Footnote";

export default function Footnotes({ footnotes = [], id }) {
  return (
    <div className="footnotes">
      <a id={id} className="anchor" />
      <div className="label">Notes</div>
      <div className="notes">
        {footnotes.map((footnote) => (
          <Footnote key={footnote.id} {...footnote}>
            {footnote.value}
          </Footnote>
        ))}
      </div>
    </div>
  );
}

Footnotes.propTypes = {
  footnotes: PropTypes.array.isRequired,
  id: PropTypes.string.isRequired,
};