mirror of
https://github.com/fleetdm/fleet
synced 2026-05-18 14:38:53 +00:00
* Sidebar/Layout improvements * New Query route and page * Display text editor * Gradient style longhand * Slider button component * Move new query section to component * Kolide Ace theme * Styles slider on page * run query on CMD + Enter * clicking hosts sends user to homepage * SaveQueryForm component * Splits NewQuery component JSX into multiple dumb components * InputField component * save query form * new query * styleguide * moves all new query form logic to the new query form * Kolide theme for osquery tables
55 lines
1 KiB
JavaScript
55 lines
1 KiB
JavaScript
import styles from '../../../../styles';
|
|
|
|
const { color, font } = styles;
|
|
|
|
export default {
|
|
componentLabelStyles: (error) => {
|
|
if (!error) return {};
|
|
|
|
return {
|
|
color: color.alert,
|
|
};
|
|
},
|
|
inputErrorStyles: (error) => {
|
|
if (!error) return {};
|
|
|
|
return {
|
|
borderColor: color.alert,
|
|
};
|
|
},
|
|
inputStyles: (type, value) => {
|
|
const baseStyles = {
|
|
borderColor: color.brand,
|
|
borderRadius: '2px',
|
|
borderStyle: 'solid',
|
|
borderWidth: '1px',
|
|
fontSize: font.base,
|
|
color: color.accentText,
|
|
paddingRight: '30px',
|
|
opacity: '1',
|
|
textIndent: '1px',
|
|
position: 'relative',
|
|
boxSizing: 'border-box',
|
|
':focus': {
|
|
outline: 'none',
|
|
},
|
|
};
|
|
|
|
if (type === 'password' && value) {
|
|
return {
|
|
...baseStyles,
|
|
letterSpacing: '7px',
|
|
color: color.textUltradark,
|
|
};
|
|
}
|
|
|
|
if (value) {
|
|
return {
|
|
...baseStyles,
|
|
color: color.textUltradark,
|
|
};
|
|
}
|
|
|
|
return baseStyles;
|
|
},
|
|
};
|