UNPKG

@selfcommunity/react-ui

Version:

React UI Components to integrate a Community created with SelfCommunity Platform.

21 lines (20 loc) 774 B
import { __rest } from "tslib"; import { jsx as _jsx } from "react/jsx-runtime"; import { forwardRef } from 'react'; import { styled } from '@mui/material/styles'; import { Card } from '@mui/material'; import classNames from 'classnames'; const PREFIX = 'SCWidget'; const classes = { root: `${PREFIX}-root` }; const Root = styled(Card, { name: PREFIX, slot: 'Root', overridesResolver: (props, styles) => styles.root })(({ theme }) => ({})); const Widget = (props, ref) => { const { className, onHeightChange, onStateChange } = props, rest = __rest(props, ["className", "onHeightChange", "onStateChange"]); return _jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { ref: ref })); }; export default forwardRef(Widget);