I have a color map and I need to return only the keys of this map using the function. But I can return only the first key name. I tried to take all name of the keys call section-color, tree-line-color, table-header-color, table-cell-color. But I can't. Please help me.
$base-color: (
section-color: #506c89,
tree-line-color: #737373,
table-header-color: #2a3949,
table-cell-color: #182028
);
@function color-map($key) {
@each $key, $value in $base-color {
@return $key;
}
}
@debug color-map(tree-line-color);