-
Notifications
You must be signed in to change notification settings - Fork 904
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replacing "Add Card" tab with "Edit Cards" sub-tab [NTP]
- Loading branch information
Showing
23 changed files
with
98 additions
and
128 deletions.
There are no files selected for viewing
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
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
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
45 changes: 0 additions & 45 deletions
45
components/brave_new_tab_ui/components/default/addCard/index.tsx
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
components/brave_new_tab_ui/components/default/addCard/style.ts
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
components/brave_new_tab_ui/components/default/editCards/assets/edit-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions
34
components/brave_new_tab_ui/components/default/editCards/index.tsx
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 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
import * as React from 'react' | ||
import { getLocale } from '../../../../common/locale' | ||
|
||
// Components | ||
import { | ||
StyledWrapper, | ||
StyledTitle, | ||
StyledEditIcon | ||
} from './style' | ||
import EditIcon from './assets/edit-icon.svg' | ||
|
||
interface Props { | ||
onEditCards: () => void | ||
} | ||
|
||
export default class EditCards extends React.PureComponent<Props, {}> { | ||
|
||
render () { | ||
return ( | ||
<StyledWrapper onClick={this.props.onEditCards}> | ||
<StyledTitle> | ||
<StyledEditIcon src={EditIcon} /> | ||
<span> | ||
{getLocale('editCardsTitle')} | ||
</span> | ||
</StyledTitle> | ||
</StyledWrapper> | ||
) | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
components/brave_new_tab_ui/components/default/editCards/style.ts
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,44 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License. v. 2.0. If a copy of the MPL was not distributed with this file. | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
import styled from 'brave-ui/theme' | ||
import palette from 'brave-ui/theme/colors' | ||
|
||
export const StyledWrapper = styled<{}, 'button'>('button')` | ||
width: 100%; | ||
border: none; | ||
display: block; | ||
margin-top: 5px; | ||
appearance: none; | ||
border-radius: 8px; | ||
cursor: pointer; | ||
backdrop-filter: blur(23px); | ||
padding: 12px 20px; | ||
background: linear-gradient(90deg, rgba(33, 37, 41, 0.6) 0%, rgba(33, 37, 41, 0.24) 100%); | ||
outline: none; | ||
&:hover { | ||
background: rgba(33, 37, 41, 0.5); | ||
} | ||
&:focus-visible { | ||
box-shadow: 0 0 0 1px ${p => p.theme.color.brandBrave}; | ||
} | ||
` | ||
|
||
export const StyledTitle = styled<{}, 'div'>('div')` | ||
display: flex; | ||
align-items: center; | ||
width: fit-content; | ||
font-size: 13px; | ||
font-weight: 600; | ||
color: ${palette.white}; | ||
margin: 0 auto; | ||
font-family: ${p => p.theme.fontFamily.heading}; | ||
` | ||
|
||
export const StyledEditIcon = styled<{}, 'img'>('img')` | ||
width: 14px; | ||
margin-right: 10px; | ||
` |
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
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
File renamed without changes.
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
Oops, something went wrong.