mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Decreasing contrast of card border.
This commit is contained in:
parent
595e82b354
commit
d284419eaf
1 changed files with 7 additions and 4 deletions
|
|
@ -23,7 +23,7 @@ import {
|
|||
TabPane as TAB_PANE,
|
||||
TextArea as TEXTAREA
|
||||
} from "semantic-ui-react";
|
||||
import {isEmpty, ColorToSemanticHexColor} from "./Common";
|
||||
import {ColorToSemanticHexColor, isEmpty} from "./Common";
|
||||
|
||||
export const darkTheme = 'dark';
|
||||
export const lightTheme = 'light';
|
||||
|
|
@ -293,11 +293,14 @@ export function CardIcon(props) {
|
|||
}
|
||||
|
||||
export function Card({color, ...props}) {
|
||||
const {inverted} = useContext(ThemeContext);
|
||||
|
||||
props['style'] = props['style'] || {};
|
||||
let hexColor = ColorToSemanticHexColor(color);
|
||||
if (hexColor) {
|
||||
let emphasisColor = ColorToSemanticHexColor(color);
|
||||
if (emphasisColor) {
|
||||
// Increase drop shadow to emphasize color.
|
||||
props['style']['boxShadow'] = `0 0 0 2px #d4d4d5, 0 5px 0 0 ${hexColor}, 0 0px 3px 0 #d4d4d5`;
|
||||
const borderColor = inverted ? '#888' : '#ddd';
|
||||
props['style']['boxShadow'] = `0 0 0 2px ${borderColor}, 0 5px 0 0 ${emphasisColor}, 0 0px 3px 0 #d4d4d5`;
|
||||
}
|
||||
return <CARD {...props}/>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue