Skip to content

Commit

Permalink
Merge pull request #30077 from software-mansion-labs/ts-migration/Sel…
Browse files Browse the repository at this point in the history
…ectCircle
  • Loading branch information
cead22 authored Nov 6, 2023
2 parents ee0fb61 + 6535cea commit 1c1fb1d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 40 deletions.
40 changes: 0 additions & 40 deletions src/components/SelectCircle.js

This file was deleted.

31 changes: 31 additions & 0 deletions src/components/SelectCircle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react';
import {StyleProp, View, ViewStyle} from 'react-native';
import globalStyles from '@styles/styles';
import themeColors from '@styles/themes/default';
import Icon from './Icon';
import * as Expensicons from './Icon/Expensicons';

type SelectCircleProps = {
/** Should we show the checkmark inside the circle */
isChecked: boolean;

/** Additional styles to pass to SelectCircle */
styles?: StyleProp<ViewStyle>;
};

function SelectCircle({isChecked = false, styles}: SelectCircleProps) {
return (
<View style={[globalStyles.selectCircle, globalStyles.alignSelfCenter, styles]}>
{isChecked && (
<Icon
src={Expensicons.Checkmark}
fill={themeColors.iconSuccessFill}
/>
)}
</View>
);
}

SelectCircle.displayName = 'SelectCircle';

export default SelectCircle;

0 comments on commit 1c1fb1d

Please sign in to comment.