content: /**
   * Copyright IBM Corp. 2016, 2018
   *
   * This source code is licensed under the Apache-2.0 license found in the
   * LICENSE file in the root directory of this source tree.
   */
  
  import React from 'react';
  import PropTypes from 'prop-types';
  import cx from 'classnames';
  import { usePrefix } from '../../internal/usePrefix';
  
  export function Layer({
    as: BaseComponent = 'div',
    className: customClassName,
    children,
    ...rest
  }) {
    const prefix = usePrefix();
    const className = cx(`${prefix}--layer`, customClassName);
    return (
      <BaseComponent {...rest} className={className}>
        {children}
      </BaseComponent>
    );
  }
  
  Layer.propTypes = {
    /**
     * Specify a custom component or element to be rendered as the top-level
     * element in the component
     */
    as: PropTypes.oneOfType([
      PropTypes.func,
      PropTypes.string,
      PropTypes.elementType,
    ]),
  
    /**
     * Provide child elements to be rendered inside of `Theme`
     */
    children: PropTypes.node,
  
    /**
     * Provide a custom class name to be used on the outermost element rendered by
     * the component
     */
    className: PropTypes.string,
  };
  