PdfSelectionMenuItem
class PdfSelectionMenuItem(val label: String, val icon: @Composable () -> Unit? = null, val clearsSelection: Boolean = true, val onClick: (TextSelection) -> Unit)
One action in a PdfSelectionMenu: a label, an optional leading icon slot, and what to do with the selected text.
Parameters
label
the action's text.
icon
optional leading glyph, any composable (an Icon, an image, an emoji in a BasicText). Null renders the label alone.
clearsSelection
whether the selection is dismissed after onClick. True for terminal actions (copy, highlight); false for actions that keep the words selected (say, a share sheet the user may cancel).
onClick
receives the selection the user acted on.
Constructors
Link copied to clipboard
constructor(label: String, icon: @Composable () -> Unit? = null, clearsSelection: Boolean = true, onClick: (TextSelection) -> Unit)