react-native-cn-richtext-editor
Version:
RichText Editor for React-Native
53 lines (52 loc) • 1.64 kB
JavaScript
import React, { Component } from 'react'
import {
View,
TouchableWithoutFeedback,
TouchableHighlight,
Text,
StyleSheet
} from 'react-native'
import { CNToolbarIcon } from './CNToolbarIcon'
export const CNToolbarSetIcon = (props) => {
const {
size,
color,
backgroundColor,
selectedColor,
selectedBackgroundColor,
selectedStyles,
selectedTag,
iconArray,
iconSetContainerStyle,
iconStyles,
onStyleKeyPress
} = props
return (
<View style={iconSetContainerStyle}>
{iconArray.map((object, index) => {
const {
toolTypeText,
iconComponent,
buttonTypes
} = object
return (
<CNToolbarIcon
key={index}
size={size}
backgroundColor={backgroundColor}
color={color}
iconStyles={iconStyles}
toolTypeText={toolTypeText}
iconComponent={iconComponent}
onStyleKeyPress={onStyleKeyPress}
selectedColor={selectedColor}
selectedStyles={selectedStyles}
selectedTag={selectedTag}
buttonTypes={buttonTypes}
selectedBackgroundColor={selectedBackgroundColor}
/>
)
})}
</View>
)
}