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" @import "../config"
$transparent = 15% $percent = 15%
.back .back
transition all $transition transition all $transition
@ -10,21 +10,22 @@ $transparent = 15%
min-height 100vh min-height 100vh
.info .info
$color = $info background linear-gradient(to right, $infoLight, lighten($infoLight, $percent))
background linear-gradient(to left, $color, lighten($color, $transparent)) @media (prefers-color-scheme dark)
background linear-gradient(to right, $infoDark, darken($infoDark, $percent))
.success .success
$color = $success background linear-gradient(to right, $successLight, lighten($successLight, $percent))
background linear-gradient(to left, $color, lighten($color, $transparent)) @media (prefers-color-scheme dark)
background linear-gradient(to right, $successDark, darken($successDark, $percent))
.danger .error
$color = $danger background linear-gradient(to right, $errorLight, lighten($errorLight, $percent))
background linear-gradient(to left, $color, lighten($color, $transparent)) @media (prefers-color-scheme dark)
background linear-gradient(to right, $errorDark, darken($errorDark, $percent))
.warning .warning
$color = $warning background linear-gradient(to right, $warningLight, lighten($warningLight, $percent))
background linear-gradient(to left, $color, lighten($color, $transparent)) @media (prefers-color-scheme dark)
background linear-gradient(to right, $warningDark, darken($warningDark, $percent))
@media (prefers-color-scheme dark)
.back
background $darkBackground

View File

@ -14,12 +14,12 @@ interface Props {
/** /**
* Make the background a linear-gradient * Make the background a linear-gradient
* *
* @version 1.0.0 * @version 1.0.1
*/ */
export default class GradientBackground extends React.Component<Props> { export default class GradientBackground extends React.Component<Props> {
public render = () => ( 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} {this.props.children}
</div> </div>
) )