import React from "react"
import PropTypes from 'prop-types'

function Stack({ spacing = 0, children, className = "", ...props }) {

  return (
    <div className={`flex flex-col gap-${spacing} ${className}`.trim()} {...props}>
      {children}
    </div>
  )
}

Stack.propTypes = {
  children: PropTypes.node.isRequired,
  className: PropTypes.string,
  spacing: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
}

export default Stack
