Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
08bc82eb
Commit
08bc82eb
authored
6 years ago
by
Tom Robinson
Browse files
Options
Downloads
Patches
Plain Diff
Improve CollectionBadge when collection color is black/dark
parent
964c8059
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
frontend/src/metabase/questions/components/CollectionBadge.jsx
+18
-17
18 additions, 17 deletions
...end/src/metabase/questions/components/CollectionBadge.jsx
package.json
+1
-1
1 addition, 1 deletion
package.json
yarn.lock
+324
-316
324 additions, 316 deletions
yarn.lock
with
343 additions
and
334 deletions
frontend/src/metabase/questions/components/CollectionBadge.jsx
+
18
−
17
View file @
08bc82eb
...
...
@@ -6,22 +6,23 @@ import * as Urls from "metabase/lib/urls";
import
Color
from
"
color
"
;
import
cx
from
"
classnames
"
;
const
CollectionBadge
=
({
className
,
collection
})
=>
(
<
Link
to
=
{
Urls
.
collection
(
collection
)
}
className
=
{
cx
(
className
,
"
flex align-center px1 rounded mx1
"
)
}
style
=
{
{
fontSize
:
14
,
color
:
Color
(
collection
.
color
)
.
darken
(
0.1
)
.
hex
(),
backgroundColor
:
Color
(
collection
.
color
)
.
lighten
(
0.4
)
.
hex
(),
}
}
>
{
collection
.
name
}
</
Link
>
);
const
CollectionBadge
=
({
className
,
collection
})
=>
{
const
color
=
Color
(
collection
.
color
);
const
darkened
=
color
.
darken
(
0.1
);
const
lightened
=
color
.
lighten
(
0.4
);
return
(
<
Link
to
=
{
Urls
.
collection
(
collection
)
}
className
=
{
cx
(
className
,
"
flex align-center px1 rounded mx1
"
)
}
style
=
{
{
fontSize
:
14
,
color
:
lightened
.
isDark
()
?
"
#fff
"
:
darkened
,
backgroundColor
:
lightened
,
}
}
>
{
collection
.
name
}
</
Link
>
);
};
export
default
CollectionBadge
;
This diff is collapsed.
Click to expand it.
package.json
+
1
−
1
View file @
08bc82eb
...
...
@@ -15,7 +15,7 @@
"
c-3po
"
:
"
^0.7.3
"
,
"
chevrotain
"
:
"
0.21.0
"
,
"
classnames
"
:
"
^2.1.3
"
,
"
color
"
:
"
^
1
.0.
3
"
,
"
color
"
:
"
^
3
.0.
0
"
,
"
crossfilter
"
:
"
^1.3.12
"
,
"
cxs
"
:
"
^5.0.0
"
,
"
d3
"
:
"
^3.5.17
"
,
...
...
This diff is collapsed.
Click to expand it.
yarn.lock
+
324
−
316
View file @
08bc82eb
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment