Changeset View
Changeset View
Standalone View
Standalone View
web/chat/chat-constants.js
// @flow | // @flow | ||||
import { messageKey } from 'lib/shared/message-utils.js'; | |||||
import type { MessageInfo } from 'lib/types/message-types.js'; | |||||
import type { ComposedMessageID } from './composed-message.react.js'; | |||||
export const tooltipStyle = { | export const tooltipStyle = { | ||||
paddingLeft: 5, | paddingLeft: 5, | ||||
paddingRight: 5, | paddingRight: 5, | ||||
rowGap: 3, | rowGap: 3, | ||||
}; | }; | ||||
export const tooltipLabelStyle = { | export const tooltipLabelStyle = { | ||||
padding: 6, | padding: 6, | ||||
Show All 9 Lines | |||||
export const typeaheadStyle = { | export const typeaheadStyle = { | ||||
tooltipWidth: 296, | tooltipWidth: 296, | ||||
tooltipMaxHeight: 268, | tooltipMaxHeight: 268, | ||||
tooltipVerticalPadding: 16, | tooltipVerticalPadding: 16, | ||||
tooltipLeftOffset: 16, | tooltipLeftOffset: 16, | ||||
tooltipTopOffset: 4, | tooltipTopOffset: 4, | ||||
rowHeight: 40, | rowHeight: 40, | ||||
}; | }; | ||||
export const getComposedMessageID = ( | |||||
messageInfo: MessageInfo, | |||||
): ComposedMessageID => { | |||||
return `ComposedMessageBox-${messageKey(messageInfo)}`; | |||||
}; | |||||
export const defaultMaxTextAreaHeight = 150; | |||||
// The editBoxBottomRowHeight is the height of the bottom row in the edit box | |||||
// which is the height of the buttons in the bottom row. | |||||
export const editBoxBottomRowHeight = 22; | |||||
// The editBoxHeight is a height of the all elements of the edit box | |||||
// except for the textarea. | |||||
// It consists of: | |||||
// - 2 * 10px: .editMessage padding (edit-text-message.css) | |||||
// - 10px: .bottomRow padding between the bottom row buttons | |||||
// and the textarea (edit-text-message.css) | |||||
// - 2 * 8px: .inputBarTextInput padding (chat-input-bar.css) | |||||
// - 22px: height of the bottom row in the edit box (explained above) | |||||
// - textarea height which is NOT included here | |||||
export const editBoxHeight: number = 3 * 10 + 2 * 8 + editBoxBottomRowHeight; |