Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
webf
react-webf
Commits
e9b4946d
Commit
e9b4946d
authored
Feb 25, 2020
by
Mickaël Bourgier
Browse files
🐛
[CssBaseline/colors] Fix all colors were undefined
parent
d1c029a7
Pipeline
#1512
passed with stage
in 51 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
e9b4946d
...
...
@@ -8,6 +8,7 @@
### Bug fixes
-
**[ListItem]**
Prevent default event on click if component is "a"
-
**[CssBaseline/colors]**
Fix all colors were undefined
-
**[CssBaseline/reboot]**
Use primary color for links
### New features
...
...
src/CssBaseline/CssBaseline.styles.color.js
View file @
e9b4946d
export
default
({
colors
})
=>
{
const
variants
=
[
'
default
'
,
'
disabled
'
,
'
primary
'
,
'
success
'
,
'
info
'
,
'
warning
'
,
'
danger
'
,
'
light
'
,
'
dark
'
];
const
variants
=
[
'
default
'
,
'
disabled
'
,
'
primary
'
,
'
success
'
,
'
info
'
,
'
warning
'
,
'
danger
'
,
'
light
'
,
'
dark
'
];
return
{
'
@global
'
:
{
...
Object
.
assign
(
...
variants
.
map
(
variant
=>
({
[
`.text-
${
variant
}
`
]:
{
color
:
`
${
colors
[
variant
]}
!important`
}
}))
),
...
Object
.
assign
(
...
variants
.
map
(
variant
=>
({
[
`.bg-
${
variant
}
`
]:
{
backgroundColor
:
`
${
colors
[
variant
]}
!important`
}
}))
)
}
};
};
export
default
({
colors
})
=>
({
'
@global
'
:
{
...
Object
.
assign
(
...
variants
.
map
(
variant
=>
({
[
`.text-
${
variant
}
`
]:
{
color
:
`
${
colors
.
palette
[
variant
]}
!important`
}
}))
),
...
Object
.
assign
(
...
variants
.
map
(
variant
=>
({
[
`.bg-
${
variant
}
`
]:
{
backgroundColor
:
`
${
colors
.
palette
[
variant
]}
!important`
}
}))
)
}
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment