Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
color: #444a57;
transition: border-color ${transitions.main};
position: relative;
font-size: 15px;
line-height: 1.5;
select& {
text-indent: 14px;
height: 58px;
}
`,
widgetActive: `
border-color: ${colors.active};
`,
widgetError: `
border-color: ${colors.errorText};
`,
};
const ControlContainer = styled.div`
margin-top: 16px;
&:first-of-type {
margin-top: 36px;
}
`;
const ControlErrorsList = styled.ul`
list-style-type: none;
font-size: 12px;
color: ${colors.errorText};
margin-bottom: 5px;
font-size: 14px;
padding: 10px 10px;
margin-bottom: 15px;
margin-top: 6px;
width: 100%;
position: relative;
z-index: 1;
&:focus {
outline: none;
box-shadow: inset 0 0 0 2px ${colors.active};
}
`;
const ErrorMessage = styled.p`
color: ${colors.errorText};
`;
let component = null;
if (window.netlifyIdentity) {
window.netlifyIdentity.on('login', user => {
component && component.handleIdentityLogin(user);
});
window.netlifyIdentity.on('logout', () => {
component && component.handleIdentityLogout();
});
}
export default class GitGatewayAuthenticationPage extends React.Component {
constructor(props) {
super(props);
color: ${props => (props.error ? colors.errorText : 'inherit')};
background-color: ${colors.textFieldBorder};
`,
info: css`
background-color: ${colors.infoBackground};
color: ${colors.infoText};
`,
success: css`
background-color: ${colors.successBackground};
color: ${colors.successText};
`,
warning: css`
background-color: ${colors.warnBackground};
color: ${colors.warnText};
`,
danger: css`
background-color: ${colors.errorBackground};
color: ${colors.errorText};
`,
};
const Toast = ({ kind, message, t }) => (
<div>
{t(message.key, { details: message.details })}
</div>
);
Toast.propTypes = {
kind: PropTypes.oneOf(['info', 'success', 'warning', 'danger']).isRequired,
message: PropTypes.object,
t: PropTypes.func.isRequired,
};