@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
28 lines • 940 B
JavaScript
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["title", "backgroundColor", "color"];
import React from 'react';
import { Box, useTheme } from '@mui/material';
import { jsx as _jsx } from "react/jsx-runtime";
var WTag = function WTag(_ref) {
var _ref$title = _ref.title,
title = _ref$title === void 0 ? 'Title' : _ref$title,
backgroundColor = _ref.backgroundColor,
color = _ref.color,
props = _objectWithoutProperties(_ref, _excluded);
var theme = useTheme();
return /*#__PURE__*/_jsx(Box, Object.assign({
component: "span",
sx: {
display: 'inline-block',
fontSize: '14px',
fontWeight: '500',
backgroundColor: backgroundColor || theme.palette.primary.light,
color: color || theme.palette.primary.main,
p: '8px 16px',
borderRadius: '10px'
}
}, props, {
children: title
}));
};
export default WTag;