JsTextDrawer

class JsTextDrawer(modifier: Modifier = Modifier, textStyle: TextStyle? = null, focusRequester: FocusRequester? = null, onKeyEvent: (KeyEvent, TextFieldValue, StoryStep, Int) -> Boolean = { _, _, _, _ -> false }, onTextEdit: (Action.StoryStateChange) -> Unit = { }, commandHandler: TextCommandHandler = TextCommandHandler(emptyMap()), var onFocusChanged: (FocusState) -> Unit = {}) : SimpleTextDrawer

Simple message drawer mostly intended to be used as a component for more complex drawers. This class contains the logic of the basic message of the SDK. As many other drawers need some text in it this Drawer can be used instead of duplicating this text logic.

Important: This class is currently a duplication of TextDrawer for JS due to compilation problems. This class may be substituted for TextDrawer.

Constructors

Link copied to clipboard
constructor(modifier: Modifier = Modifier, textStyle: TextStyle? = null, focusRequester: FocusRequester? = null, onKeyEvent: (KeyEvent, TextFieldValue, StoryStep, Int) -> Boolean = { _, _, _, _ -> false }, onTextEdit: (Action.StoryStateChange) -> Unit = { }, commandHandler: TextCommandHandler = TextCommandHandler(emptyMap()), onFocusChanged: (FocusState) -> Unit = {})

Properties

Link copied to clipboard
open override var onFocusChanged: (FocusState) -> Unit

Functions

Link copied to clipboard
open override fun Text(step: StoryStep, drawInfo: DrawInfo, interactionSource: MutableInteractionSource, focusRequester: FocusRequester?, decorationBox: @Composable (innerTextField: @Composable () -> Unit) -> Unit)

Draws the StoryStep including its DrawInfo