import { StyleSheet } from 'react-native'; import heroVariables from '../global'; const SELECTED_TOOLBAR_BACKGROUND_COLOR = heroVariables.GREY_4; const TOOLBAR_BACKGROUND_COLOR = heroVariables.GREY_LIGHT_90; const TOOLBAR_BORDER_COLOR = heroVariables.BORDER_COLOR; const TOOLBAR_BUTTON_SIZE = heroVariables.LARGE_SIZE + heroVariables.SMALL_SIZE * 2.0; const SEPARATOR_HEIGHT = heroVariables.MEDIUM_SIZE; const SEPARATOR_MARGIN = heroVariables.MEDIUM_SIZE; const SEPARATOR_COLOR = heroVariables.BORDER_COLOR; const EDITOR_FONT_SIZE = heroVariables.HEADER_4; const EDITOR_PADDING = heroVariables.MEDIUM_SIZE; const EDITOR_MARGIN = heroVariables.MEDIUM_SIZE; const EDITOR_BORDER_COLOR = heroVariables.BORDER_COLOR; const ERROR_FONT_SIZE = heroVariables.HEADER_5; const ERROR_MARGIN_VERTICAL = heroVariables.SMALL_SIZE; const ERROR_COLOR = heroVariables.DANGER_COLOR; const fontStyles = heroVariables.FONT_FAMILY !== undefined ? { fontFamily: heroVariables.FONT_FAMILY } : {}; const richTextEditorStyles = { wrapper: { marginBottom: EDITOR_MARGIN, }, webview: { minHeight: 120.0, backgroundColor: 'transparent', borderBottomWidth: 0.8, borderBottomColor: EDITOR_BORDER_COLOR, }, editor: { padding: EDITOR_PADDING, fontSize: EDITOR_FONT_SIZE, }, suggestionList: {}, toolbar: { flexDirection: 'row', alignItems: 'center', borderTopWidth: StyleSheet.hairlineWidth, borderTopColor: TOOLBAR_BORDER_COLOR, backgroundColor: TOOLBAR_BACKGROUND_COLOR, }, toolbarButton: { width: TOOLBAR_BUTTON_SIZE, height: TOOLBAR_BUTTON_SIZE, alignItems: 'center', justifyContent: 'center', }, selectedToolbarButton: { width: TOOLBAR_BUTTON_SIZE, height: TOOLBAR_BUTTON_SIZE, alignItems: 'center', justifyContent: 'center', backgroundColor: SELECTED_TOOLBAR_BACKGROUND_COLOR, }, separator: { width: 0.0, height: SEPARATOR_HEIGHT, marginHorizontal: SEPARATOR_MARGIN, borderRightWidth: 1.0, borderRightColor: SEPARATOR_COLOR, }, errorMessage: { minHeight: ERROR_FONT_SIZE, lineHeight: ERROR_FONT_SIZE, marginTop: ERROR_MARGIN_VERTICAL, fontSize: ERROR_FONT_SIZE, fontWeight: '500', color: ERROR_COLOR, ...fontStyles, }, errorWebview: { borderBottomColor: ERROR_COLOR, }, } as const; export default richTextEditorStyles;