-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #771 from opentripplanner/account-page-contrast
Account page contrast
- Loading branch information
Showing
5 changed files
with
65 additions
and
36 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Button } from 'react-bootstrap' | ||
import { FormattedMessage } from 'react-intl' | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
|
||
import { RED_ON_WHITE } from '../util/colors' | ||
|
||
interface Props { | ||
onDelete: () => void | ||
} | ||
|
||
const DeleteButton = styled(Button)` | ||
background-color: white; | ||
border-color: ${RED_ON_WHITE}; | ||
color: ${RED_ON_WHITE}; | ||
:active, | ||
:focus, | ||
:focus:active, | ||
:hover { | ||
border-color: ${RED_ON_WHITE}; | ||
color: ${RED_ON_WHITE}; | ||
} | ||
` | ||
|
||
/** | ||
* Renders a delete user button for the account settings page. | ||
*/ | ||
const DeleteUser = ({ onDelete }: Props): JSX.Element => ( | ||
<DeleteButton block bsSize="large" onClick={onDelete}> | ||
<FormattedMessage id="components.DeleteUser.deleteMyAccount" /> | ||
</DeleteButton> | ||
) | ||
|
||
export default DeleteUser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* A red color similar to Bootstrap's "alert" background #d9534f, | ||
* but with enough contrast over white backgrounds | ||
*/ | ||
export const RED_ON_WHITE = '#d1332e' | ||
|
||
/** | ||
* A gray color similar to #808080 or #888, | ||
* but with enough contrast on white backgrounds. | ||
*/ | ||
export const GRAY_ON_WHITE = '#757575' |