mirror of
https://github.com/dzeiocom/components.git
synced 2025-04-23 11:22:11 +00:00
Fixed Error color not set
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
7000d3ebac
commit
58d1db14ae
@ -1,6 +1,6 @@
|
||||
@import "../config"
|
||||
|
||||
$transparent = 15%
|
||||
$percent = 15%
|
||||
|
||||
.back
|
||||
transition all $transition
|
||||
@ -10,21 +10,22 @@ $transparent = 15%
|
||||
min-height 100vh
|
||||
|
||||
.info
|
||||
$color = $info
|
||||
background linear-gradient(to left, $color, lighten($color, $transparent))
|
||||
background linear-gradient(to right, $infoLight, lighten($infoLight, $percent))
|
||||
@media (prefers-color-scheme dark)
|
||||
background linear-gradient(to right, $infoDark, darken($infoDark, $percent))
|
||||
|
||||
|
||||
.success
|
||||
$color = $success
|
||||
background linear-gradient(to left, $color, lighten($color, $transparent))
|
||||
background linear-gradient(to right, $successLight, lighten($successLight, $percent))
|
||||
@media (prefers-color-scheme dark)
|
||||
background linear-gradient(to right, $successDark, darken($successDark, $percent))
|
||||
|
||||
.danger
|
||||
$color = $danger
|
||||
background linear-gradient(to left, $color, lighten($color, $transparent))
|
||||
.error
|
||||
background linear-gradient(to right, $errorLight, lighten($errorLight, $percent))
|
||||
@media (prefers-color-scheme dark)
|
||||
background linear-gradient(to right, $errorDark, darken($errorDark, $percent))
|
||||
|
||||
.warning
|
||||
$color = $warning
|
||||
background linear-gradient(to left, $color, lighten($color, $transparent))
|
||||
|
||||
@media (prefers-color-scheme dark)
|
||||
.back
|
||||
background $darkBackground
|
||||
background linear-gradient(to right, $warningLight, lighten($warningLight, $percent))
|
||||
@media (prefers-color-scheme dark)
|
||||
background linear-gradient(to right, $warningDark, darken($warningDark, $percent))
|
||||
|
@ -14,12 +14,12 @@ interface Props {
|
||||
/**
|
||||
* Make the background a linear-gradient
|
||||
*
|
||||
* @version 1.0.0
|
||||
* @version 1.0.1
|
||||
*/
|
||||
export default class GradientBackground extends React.Component<Props> {
|
||||
|
||||
public render = () => (
|
||||
<div className={buildClassName(css.back, [css[this.props.color as string], this.props.color], this.props.className)}>
|
||||
<div className={buildClassName(css.back, [css[this.props.color as string], this.props.color], this.props.className, [css.fullscreen, this.props.fullscreen])}>
|
||||
{this.props.children}
|
||||
</div>
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user