fleet/frontend/components/forms/fields/InputFieldWithIcon/styles.js
Mike Stone 482d025d05 Reset password page (#181)
* Extracts stacked boxes UI to a re-usable component

* Presence validator

* Equality validator

* Adds ResetPasswordFrom

* PasswordResetPage component and route

* Ex icon on forgot pw page goes to login

* Smooth out the fonts so they match the mocks

* Remove dynamic background and refactor colors
2016-09-16 17:19:37 -04:00

62 lines
1.2 KiB
JavaScript

import styles from '../../../../styles';
const { color, font, padding } = styles;
export default {
containerStyles: {
marginTop: padding.base,
position: 'relative',
},
errorStyles: {
color: color.alert,
fontSize: font.small,
textTransform: 'lowercase',
},
iconStyles: {
position: 'absolute',
right: '6px',
top: '29px',
},
inputErrorStyles: (error) => {
if (error) {
return {
borderBottomColor: color.alert,
};
}
return {};
},
inputStyles: (value) => {
const baseStyles = {
borderLeft: 'none',
borderRight: 'none',
borderTop: 'none',
borderBottomWidth: '1px',
borderBottomStyle: 'solid',
borderBottomColor: color.brand,
color: color.accentText,
width: '378px',
':focus': {
outline: 'none',
},
};
if (value) {
return {
...baseStyles,
color: color.textUltradark,
};
}
return baseStyles;
},
placeholderStyles: (value) => {
if (!value) return { visibility: 'hidden', height: '22px' };
return {
color: color.brand,
fontSize: font.small,
textTransform: 'lowercase',
};
},
};