-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 #2215 from Expensify/Rory-RenameOptionRowTitle
[No QA] Rename and cleanup OptionRowTitle
- Loading branch information
Showing
12 changed files
with
114 additions
and
122 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,33 @@ | ||
import PropTypes from 'prop-types'; | ||
|
||
const propTypes = { | ||
// The full title of the DisplayNames component (not split up) | ||
fullTitle: PropTypes.string, | ||
|
||
// Array of objects that map display names to their corresponding tooltip | ||
displayNamesWithTooltips: PropTypes.arrayOf(PropTypes.shape({ | ||
// The name to display in bold | ||
displayName: PropTypes.string, | ||
|
||
// The tooltip to show when the associated name is hovered | ||
tooltip: PropTypes.string, | ||
})), | ||
|
||
// Number of lines before wrapping | ||
numberOfLines: PropTypes.number, | ||
|
||
// Is tooltip needed? | ||
// When true, triggers complex title rendering | ||
tooltipEnabled: PropTypes.bool, | ||
|
||
// Arbitrary styles of the displayName text | ||
textStyles: PropTypes.arrayOf(PropTypes.any), | ||
}; | ||
|
||
const defaultProps = { | ||
numberOfLines: 1, | ||
tooltipEnabled: false, | ||
titleStyles: [], | ||
}; | ||
|
||
export {propTypes, defaultProps}; |
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,20 @@ | ||
import React from 'react'; | ||
import {Text} from 'react-native'; | ||
import {propTypes, defaultProps} from './displayNamesPropTypes'; | ||
|
||
// As we don't have to show tooltips of the Native platform so we simply render the full display names list. | ||
const DisplayNames = ({ | ||
fullTitle, | ||
numberOfLines, | ||
textStyles, | ||
}) => ( | ||
<Text style={textStyles} numberOfLines={numberOfLines}> | ||
{fullTitle} | ||
</Text> | ||
); | ||
|
||
DisplayNames.propTypes = propTypes; | ||
DisplayNames.defaultProps = defaultProps; | ||
DisplayNames.displayName = 'DisplayNames'; | ||
|
||
export default DisplayNames; |
This file was deleted.
Oops, something went wrong.
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
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
37 changes: 0 additions & 37 deletions
37
src/pages/home/sidebar/OptionRowTitle/OptionRowTitleProps.js
This file was deleted.
Oops, something went wrong.
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
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