mirror of
https://github.com/dzeiocom/components.git
synced 2025-06-16 12:39:20 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
be724ecf0d
|
|||
58d1db14ae
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@dzeio/components",
|
||||
"version": "0.8.2",
|
||||
"version": "0.8.3",
|
||||
"license": "MIT",
|
||||
"main": "./index.js",
|
||||
"types": "./types/index.d.ts",
|
||||
|
@ -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>
|
||||
)
|
||||
|
Reference in New Issue
Block a user