UNPKG

@material-ui/lab

Version:
78 lines (70 loc) 2.4 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { unstable_composeClasses as composeClasses } from '@material-ui/unstyled'; import { styled, useThemeProps } from '@material-ui/core/styles'; import { getTimelineConnectorUtilityClass } from './timelineConnectorClasses'; import { jsx as _jsx } from "react/jsx-runtime"; var useUtilityClasses = function useUtilityClasses(styleProps) { var classes = styleProps.classes; var slots = { root: ['root'] }; return composeClasses(slots, getTimelineConnectorUtilityClass, classes); }; var TimelineConnectorRoot = styled('span', { name: 'MuiTimelineConnector', slot: 'Root', overridesResolver: function overridesResolver(props, styles) { return styles.root; } })(function (_ref) { var theme = _ref.theme; return { width: 2, backgroundColor: theme.palette.grey[400], flexGrow: 1 }; }); var TimelineConnector = /*#__PURE__*/React.forwardRef(function TimelineConnector(inProps, ref) { var props = useThemeProps({ props: inProps, name: 'MuiTimelineConnector' }); var className = props.className, other = _objectWithoutProperties(props, ["className"]); var styleProps = props; var classes = useUtilityClasses(styleProps); return /*#__PURE__*/_jsx(TimelineConnectorRoot, _extends({ className: clsx(classes.root, className), styleProps: styleProps, ref: ref }, other)); }); process.env.NODE_ENV !== "production" ? TimelineConnector.propTypes /* remove-proptypes */ = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit the d.ts file and run "yarn proptypes" | // ---------------------------------------------------------------------- /** * The content of the component. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. */ classes: PropTypes.object, /** * @ignore */ className: PropTypes.string, /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: PropTypes.object } : void 0; export default TimelineConnector;