com.olvind.mui.muiMaterial.anon.Error.scala Maven / Gradle / Ivy
The newest version!
package com.olvind.mui.muiMaterial.anon
import com.olvind.mui.muiMaterial.stylesCreateThemeMod.Theme
import com.olvind.mui.muiSystem.styleFunctionSxStyleFunctionSxMod.SxProps
import com.olvind.mui.muiSystem.styleFunctionSxStyleFunctionSxMod.SystemStyleObject
import slinky.core.facade.ReactElement
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
trait Error extends StObject {
/**
* The content of the component.
*/
var children: js.UndefOr[ReactElement] = js.undefined
/**
* Override or extend the styles applied to the component.
*/
var classes: js.UndefOr[PartialFormControlClasses] = js.undefined
/**
* The color of the component.
* It supports both default and custom theme colors, which can be added as shown in the
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
* @default 'primary'
*/
var color: js.UndefOr["primary" | "secondary" | "error" | "info" | "success" | "warning"] = js.undefined
/**
* If `true`, the label, input and helper text should be displayed in a disabled state.
* @default false
*/
var disabled: js.UndefOr[Boolean] = js.undefined
/**
* If `true`, the label is displayed in an error state.
* @default false
*/
var error: js.UndefOr[Boolean] = js.undefined
/**
* If `true`, the component is displayed in focused state.
*/
var focused: js.UndefOr[Boolean] = js.undefined
/**
* If `true`, the component will take up the full width of its container.
* @default false
*/
var fullWidth: js.UndefOr[Boolean] = js.undefined
/**
* If `true`, the label is hidden.
* This is used to increase density for a `FilledInput`.
* Be sure to add `aria-label` to the `input` element.
* @default false
*/
var hiddenLabel: js.UndefOr[Boolean] = js.undefined
/**
* If `dense` or `normal`, will adjust vertical spacing of this and contained components.
* @default 'none'
*/
var margin: js.UndefOr["dense" | "normal" | "none"] = js.undefined
/**
* If `true`, the label will indicate that the `input` is required.
* @default false
*/
var required: js.UndefOr[Boolean] = js.undefined
/**
* The size of the component.
* @default 'medium'
*/
var size: js.UndefOr["small" | "medium"] = js.undefined
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
var sx: js.UndefOr[SxProps[Theme]] = js.undefined
/**
* The variant to use.
* @default 'outlined'
*/
var variant: js.UndefOr["standard" | "outlined" | "filled"] = js.undefined
}
object Error {
inline def apply(): Error = {
val __obj = js.Dynamic.literal()
__obj.asInstanceOf[Error]
}
@scala.inline
implicit open class MutableBuilder[Self <: Error] (val x: Self) extends AnyVal {
inline def setChildren(value: ReactElement): Self = StObject.set(x, "children", value.asInstanceOf[js.Any])
inline def setChildrenUndefined: Self = StObject.set(x, "children", js.undefined)
inline def setClasses(value: PartialFormControlClasses): Self = StObject.set(x, "classes", value.asInstanceOf[js.Any])
inline def setClassesUndefined: Self = StObject.set(x, "classes", js.undefined)
inline def setColor(value: "primary" | "secondary" | "error" | "info" | "success" | "warning"): Self = StObject.set(x, "color", value.asInstanceOf[js.Any])
inline def setColorUndefined: Self = StObject.set(x, "color", js.undefined)
inline def setDisabled(value: Boolean): Self = StObject.set(x, "disabled", value.asInstanceOf[js.Any])
inline def setDisabledUndefined: Self = StObject.set(x, "disabled", js.undefined)
inline def setError(value: Boolean): Self = StObject.set(x, "error", value.asInstanceOf[js.Any])
inline def setErrorUndefined: Self = StObject.set(x, "error", js.undefined)
inline def setFocused(value: Boolean): Self = StObject.set(x, "focused", value.asInstanceOf[js.Any])
inline def setFocusedUndefined: Self = StObject.set(x, "focused", js.undefined)
inline def setFullWidth(value: Boolean): Self = StObject.set(x, "fullWidth", value.asInstanceOf[js.Any])
inline def setFullWidthUndefined: Self = StObject.set(x, "fullWidth", js.undefined)
inline def setHiddenLabel(value: Boolean): Self = StObject.set(x, "hiddenLabel", value.asInstanceOf[js.Any])
inline def setHiddenLabelUndefined: Self = StObject.set(x, "hiddenLabel", js.undefined)
inline def setMargin(value: "dense" | "normal" | "none"): Self = StObject.set(x, "margin", value.asInstanceOf[js.Any])
inline def setMarginUndefined: Self = StObject.set(x, "margin", js.undefined)
inline def setRequired(value: Boolean): Self = StObject.set(x, "required", value.asInstanceOf[js.Any])
inline def setRequiredUndefined: Self = StObject.set(x, "required", js.undefined)
inline def setSize(value: "small" | "medium"): Self = StObject.set(x, "size", value.asInstanceOf[js.Any])
inline def setSizeUndefined: Self = StObject.set(x, "size", js.undefined)
inline def setSx(value: SxProps[Theme]): Self = StObject.set(x, "sx", value.asInstanceOf[js.Any])
inline def setSxFunction1(value: Theme => SystemStyleObject[Theme]): Self = StObject.set(x, "sx", js.Any.fromFunction1(value))
inline def setSxNull: Self = StObject.set(x, "sx", null)
inline def setSxUndefined: Self = StObject.set(x, "sx", js.undefined)
inline def setSxVarargs(value: (Boolean | SystemStyleObject[Theme] | (js.Function1[Theme, SystemStyleObject[Theme]]))*): Self = StObject.set(x, "sx", js.Array(value*))
inline def setVariant(value: "standard" | "outlined" | "filled"): Self = StObject.set(x, "variant", value.asInstanceOf[js.Any])
inline def setVariantUndefined: Self = StObject.set(x, "variant", js.undefined)
}
}