import React from 'react'; import { FlatList, TouchableOpacity, Text } from 'react-native'; import Formats from './Formats'; const defaultStyles = { padding: 8, fontSize: 16 }; const defaultMarkdownButton = ({ item, getState, setState, color }) => { return ( item.onPress({ getState, setState, item })}> {item.title} ); }; // eslint-disable-next-line import/prefer-default-export export const renderFormatButtons = ({ getState, setState, color }, formats, markdownButton) => { const list = ( markdownButton ? markdownButton({ item, getState, setState }) : defaultMarkdownButton({ item, getState, setState, color })} horizontal /> ); return list; };