Skip to content

Commit d968410

Browse files
committed
fixup! feat(table): change selection background color and add different backgroud for grouped rows
1 parent b69f29a commit d968410

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

packages/table/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"@crave/farmblocks-text": "^1.1.9",
4242
"@crave/farmblocks-theme": "^1.5.1",
4343
"object.values": "^1.0.4",
44+
"polished": "^1.9.2",
4445
"react-addons-css-transition-group": "^15.6.2"
4546
},
4647
"devDependencies": {

packages/table/src/styledComponents/Cell.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import styled from "styled-components";
22
import { colors } from "@crave/farmblocks-theme";
3+
import { transparentize } from "polished";
34

45
const textAlign = props => props.align || "left";
56

7+
const selectedBg = transparentize(0.94, colors.INDIGO_MILK_CAP);
8+
69
const cellBg = props => {
710
if (props.selected) {
8-
return `${colors.INDIGO_MILK_CAP_06} !important`;
11+
return `${selectedBg} !important`;
912
}
1013
return props.grouped ? colors.SUGAR : "white";
1114
};

packages/theme/src/colors.js

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ module.exports = {
55
DEMERARA_SUGAR: "#e9ebec",
66
RED_ORANGE: "#ff4411",
77
INDIGO_MILK_CAP: "#3498db",
8-
INDIGO_MILK_CAP_06: "rgba(52,152,219,0.06)",
98
BLUE_CORN: "#2980b9",
109
LETTUCE: "#2ecc71",
1110
AVOCADO: "#27ae60",

yarn.lock

+4
Original file line numberDiff line numberDiff line change
@@ -7388,6 +7388,10 @@ pngjs@^3.0.0, pngjs@^3.3.3:
73887388
version "3.3.3"
73897389
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.3.3.tgz#85173703bde3edac8998757b96e5821d0966a21b"
73907390

7391+
polished@^1.9.2:
7392+
version "1.9.2"
7393+
resolved "https://registry.yarnpkg.com/polished/-/polished-1.9.2.tgz#d705cac66f3a3ed1bd38aad863e2c1e269baf6b6"
7394+
73917395
posix-character-classes@^0.1.0:
73927396
version "0.1.1"
73937397
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"

0 commit comments

Comments
 (0)