Compare commits

...

2 Commits

Author SHA1 Message Date
be724ecf0d v0.8.3 2021-04-04 21:57:44 +02:00
58d1db14ae Fixed Error color not set
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-04 21:57:27 +02:00
3 changed files with 18 additions and 17 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@dzeio/components", "name": "@dzeio/components",
"version": "0.8.2", "version": "0.8.3",
"license": "MIT", "license": "MIT",
"main": "./index.js", "main": "./index.js",
"types": "./types/index.d.ts", "types": "./types/index.d.ts",

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) @media (prefers-color-scheme dark)
.back background linear-gradient(to right, $warningDark, darken($warningDark, $percent))
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>
) )