Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit92a7445

Browse files
authored
Fix button bg (#581)
* Fix button hover accent color* v5.0.67
1 parent842ff87 commit92a7445

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"@netdata/netdata-ui",
3-
"version":"5.0.66",
3+
"version":"5.0.67",
44
"description":"netdata UI kit",
55
"main":"dist/index.js",
66
"module":"dist/es6/index.js",

‎src/components/button/styled.js‎

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,21 @@ const getTextColor = props =>
5050
:getColor(props.flavour===HOLLOW ?"secondaryColor" :"mainBackground")(props)
5151
constgetHoverColor=props=>
5252
props.neutral ?getColor("generic")(props) :getColor("accent")(props)
53-
constgetAccentColor=props=>
54-
props.neutral
55-
?getColor(props.flavour===BORDER_LESS ?"textFocus" :"neutralHighlight")(props)
56-
:getColor(props.flavour===HOLLOW ?"secondaryHighlight" :"primaryHighlight")(props)
53+
54+
constgetAccentColor=props=>{
55+
if(props.neutral)
56+
returngetColor(props.flavour===BORDER_LESS ?"textFocus" :"neutralHighlight")(props)
57+
58+
consterrorColor=props.danger ?"error" :undefined
59+
consterrorBgColor=props.danger ?"errorSemi" :undefined
60+
constwarningColor=props.warning ?"warning" :undefined
61+
constwarningBgColor=props.warning ?"warningSemi" :undefined
62+
constprimaryColor=errorColor||warningColor||"primaryHighlight"
63+
constsecondaryHollow=errorBgColor||warningBgColor||"secondaryHighlight"
64+
65+
returngetColor(props.flavour===HOLLOW ?secondaryHollow :primaryColor)(props)
66+
}
67+
5768
constgetTransparent=getColor(["transparent","full"])
5869

5970
constcolorsByFlavour=({ flavour=DEFAULT, danger, warning, iconColor})=>{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp