-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This diff introduces the app list header. This component will be used in the app list that I will introduce in subsquent diffs For context here is what the app list header looks like in the figma designs: {F997026} Linear task: https://linear.app/comm/issue/ENG-5962/create-new-app-list-card-section Depends on D10436 Test Plan: **Please note that the placement of the app list is still getting fleshed out. The focus of this diff is just the UI/UX of the app list header** Please see the demo video below {F997012} Reviewers: atul, rohan, kamil Reviewed By: atul Subscribers: ashoat, tomek Differential Revision: https://phab.comm.dev/D10437
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.container { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
background-color: var(--card-background-primary-default); | ||
padding: 16px; | ||
box-shadow: 0px 1px 3px 0px var(--card-headerShadow-primary-default); | ||
z-index: 0; | ||
border-radius: 8px 8px 0 0; | ||
} | ||
|
||
.headerLabel { | ||
color: var(--text-background-primary-default); | ||
font-weight: var(--semi-bold); | ||
} |
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,27 @@ | ||
// @flow | ||
|
||
import * as React from 'react'; | ||
|
||
import { useModalContext } from 'lib/components/modal-provider.react.js'; | ||
|
||
import css from './app-list-header.css'; | ||
import AddButton from '../components/add-button.react.js'; | ||
import AppsDirectory from '../modals/apps/apps-directory-modal.react.js'; | ||
|
||
function AppListHeader(): React.Node { | ||
const { pushModal } = useModalContext(); | ||
|
||
const onClickApps = React.useCallback( | ||
() => pushModal(<AppsDirectory />), | ||
[pushModal], | ||
); | ||
|
||
return ( | ||
<div className={css.container}> | ||
<div className={css.headerLabel}>Your apps</div> | ||
<AddButton onClick={onClickApps} /> | ||
</div> | ||
); | ||
} | ||
|
||
export default AppListHeader; |
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