@coveord/plasma-mantine
Version:
A Plasma flavoured Mantine theme
110 lines (109 loc) • 3.74 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Alert", {
enumerable: true,
get: function() {
return Alert;
}
});
var _object_spread = require("@swc/helpers/_/_object_spread");
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
var _jsxruntime = require("react/jsx-runtime");
var _core = require("@mantine/core");
var _InfoToken = require("../InfoToken/InfoToken.js");
var Alert = (0, _core.polymorphicFactory)(function(props, ref) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Alert, _object_spread_props._(_object_spread._({}, props), {
ref: ref
}));
});
Alert.displayName = 'Alert';
var AlertInformation = Alert.withProps({
color: 'gray',
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken.InfoToken.Information, {
size: "md"
}),
vars: function vars() {
return {
root: {
'--alert-color': 'var(--mantine-color-text)',
'--alert-bg': 'var(--mantine-color-gray-light)',
'--alert-bd': '2px solid var(--mantine-color-gray-light)',
'--alert-radius': 'var(--mantine-radius-sm)'
}
};
}
});
AlertInformation.displayName = 'Alert.Information';
var AlertAdvice = Alert.withProps({
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken.InfoToken.Advice, {
size: "md"
}),
vars: function vars() {
return {
root: {
'--alert-color': 'var(--mantine-primary-color-filled)',
'--alert-bg': 'var(--mantine-primary-color-light)',
'--alert-bd': '2px solid var(--mantine-primary-color-light)',
'--alert-radius': 'var(--mantine-radius-sm)'
}
};
}
});
AlertAdvice.displayName = 'Alert.Advice';
var AlertSuccess = Alert.withProps({
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken.InfoToken.Success, {
size: "md"
}),
vars: function vars() {
return {
root: {
'--alert-color': 'var(--mantine-color-green-filled)',
'--alert-bg': 'var(--mantine-color-green-light)',
'--alert-bd': '2px solid var(--mantine-color-green-light)',
'--alert-radius': 'var(--mantine-radius-sm)'
}
};
}
});
AlertSuccess.displayName = 'Alert.Success';
var AlertWarning = Alert.withProps({
color: 'warning',
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken.InfoToken.Warning, {
size: "md"
}),
vars: function vars() {
return {
root: {
'--alert-color': 'var(--mantine-color-yellow-text)',
'--alert-bg': 'var(--mantine-color-yellow-light)',
'--alert-bd': '2px solid var(--mantine-color-yellow-light)',
'--alert-radius': 'var(--mantine-radius-sm)'
}
};
}
});
AlertWarning.displayName = 'Alert.Warning';
var AlertCritical = Alert.withProps({
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken.InfoToken.Error, {
size: "md"
}),
vars: function vars() {
return {
root: {
'--alert-color': 'var(--mantine-color-error)',
'--alert-bg': 'var(--mantine-color-red-light)',
'--alert-bd': '2px solid var(--mantine-color-red-light)',
'--alert-radius': 'var(--mantine-radius-sm)'
}
};
}
});
AlertCritical.displayName = 'Alert.Critical';
Alert.Information = AlertInformation;
Alert.Advice = AlertAdvice;
Alert.Warning = AlertWarning;
Alert.Critical = AlertCritical;
Alert.Success = AlertSuccess;
//# sourceMappingURL=Alert.js.map