export function IconButton()

in react-native-template-pytorch-live/template/src/components/UIComponents.tsx [104:134]


export function IconButton({
  icon = 'blur',
  onPress,
  style,
  size,
  background = colors.accent4,
  disabled = false,
  dark = true,
}: IconButtonProps) {
  return (
    <TouchableOpacity
      disabled={disabled}
      style={styles.iconContainer}
      onPress={onPress}>
      <View
        style={[
          styles.circleButton,
          size === 'small' && styles.small,
          background != null && {backgroundColor: background},
          disabled && {backgroundColor: colors.neutralBlack},
          style,
        ]}>
        <Icon
          name={icon}
          size={size === 'small' ? 24 : 42}
          color={dark ? colors.white : colors.black}
        />
      </View>
    </TouchableOpacity>
  );
}