UNPKG

carbon-react

Version:

A library of reusable React components for easily building user interfaces.

2 lines (1 loc) 1.55 kB
import{jsx as e}from"react/jsx-runtime";import"react";import t from"../../__internal__/utils/helpers/tags/tags.js";import r from"./hr.style.js";import n from"../../hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.js";import o from"../../__internal__/utils/logger/index.js";function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let a=!1;const l=l=>{var{adaptiveMxBreakpoint:s,ml:p,mr:m,"aria-hidden":u,type:c="typical",height:f="small"}=l,b=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(l,["adaptiveMxBreakpoint","ml","mr","aria-hidden","type","height"]);a||(a=!0,o.deprecate("`Hr` is deprecated and will soon be removed. Please use `Divider` instead."));const d=n(s);let y=p,h=m;return s&&!d&&(y=0,h=0),e(r,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}({"aria-hidden":u,height:f,$type:c,ml:y,mr:h,mt:b.mt||3,mb:b.mb||3},b,t("hr",b)))};export{l as Hr,l as default};