stitch-ui
Version:
21 lines (18 loc) • 450 B
JavaScript
/* eslint-disable react/no-array-index-key */
import React from "react"; // eslint-disable-line no-unused-vars
import PropTypes from "prop-types";
export default function Indent({ size }) {
return (
<span>
{new Array(size < 0 ? 0 : size)
.fill(null)
.map((x, i) => <div key={i} className="mongo-schema-indent" />)}
</span>
);
}
Indent.propTypes = {
size: PropTypes.number
};
Indent.defaultProps = {
size: 0
};