Fixed Error color not set

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2021-04-04 21:57:27 +02:00
parent 7000d3ebac
commit 58d1db14ae
Signed by: Florian Bouillon
GPG Key ID: 50BD648F12C86AB6
2 changed files with 17 additions and 16 deletions

View File

@ -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))

View File

@ -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>
)