-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mingze Xiao
committed
May 13, 2020
1 parent
5f51bf3
commit adce7c8
Showing
10 changed files
with
110 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@import '~box-ui-elements/es/styles/variables'; | ||
|
||
.ba-DefaultItemRow-email { | ||
color: $bdl-gray-62; | ||
font-size: 11px; | ||
line-height: 13px; | ||
} |
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,25 @@ | ||
import React from 'react'; | ||
import DatalistItem from 'box-ui-elements/es/components/datalist-item'; | ||
import { UserMini, GroupMini } from '../../../@types'; | ||
import './DefaultItemRow.scss'; | ||
|
||
export type Props = { | ||
id?: string; | ||
item?: UserMini | GroupMini; | ||
name?: string; | ||
}; | ||
|
||
const DefaultItemRow = ({ item, ...rest }: Props): JSX.Element | null => { | ||
if (!item || !item.name) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<DatalistItem {...rest}> | ||
<div className="ba-DefaultItemRow-name">{item.name}</div> | ||
{'email' in item && <div className="ba-DefaultItemRow-email">{item.email}</div>} | ||
</DatalistItem> | ||
); | ||
}; | ||
|
||
export default DefaultItemRow; |
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,5 @@ | ||
.ba { | ||
.ba-ItemList-row { | ||
padding: 5px 30px 5px 15px; | ||
} | ||
} |
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,5 @@ | ||
@import '~box-ui-elements/es/styles/variables'; | ||
|
||
.ba-MentionItem-link { | ||
color: $bdl-box-blue; | ||
} |
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