Skip to content

Commit

Permalink
use stylePropTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
TMisiukiewicz committed Nov 16, 2023
1 parent 06c4897 commit bf5be3a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/LHNOptionsList/LHNOptionsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ import * as OptionsListUtils from '@libs/OptionsListUtils';
import reportActionPropTypes from '@pages/home/report/reportActionPropTypes';
import reportPropTypes from '@pages/reportPropTypes';
import useThemeStyles from '@styles/useThemeStyles';
import stylePropTypes from '@styles/stylePropTypes';
import styles from '@styles/styles';
import variables from '@styles/variables';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import OptionRowLHNData from './OptionRowLHNData';

const propTypes = {
/** Wrapper style for the section list */
// eslint-disable-next-line react/forbid-prop-types
style: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]),
style: stylePropTypes,

/** Extra styles for the section list container */
contentContainerStyles: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]).isRequired,
contentContainerStyles: stylePropTypes.isRequired,

/** Sections for the section list */
data: PropTypes.arrayOf(PropTypes.string).isRequired,
Expand Down Expand Up @@ -98,7 +99,7 @@ function LHNOptionsList({
draftComments,
currentReportID,
}) {
const styles = useThemeStyles();
const themeStyles = useThemeStyles();
/**
* Function which renders a row in the list
*
Expand Down Expand Up @@ -141,7 +142,7 @@ function LHNOptionsList({
);

return (
<View style={style || styles.flex1}>
<View style={style || themeStyles.flex1}>
<FlashList
indicatorStyle="white"
keyboardShouldPersistTaps="always"
Expand All @@ -151,7 +152,7 @@ function LHNOptionsList({
keyExtractor={keyExtractor}
renderItem={renderItem}
estimatedItemSize={optionMode === CONST.OPTION_MODE.COMPACT ? variables.optionRowHeightCompact : variables.optionRowHeight}
extraData={currentReportID}
extraData={[currentReportID]}
/>
</View>
);
Expand Down

0 comments on commit bf5be3a

Please sign in to comment.