MCPcopy Create free account
hub / github.com/adobe/react-spectrum / AutoTokenize

Function AutoTokenize

starters/docs/stories/TokenField.stories.tsx:107–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105};
106
107export const AutoTokenize: Story = args => (
108 <TokenField
109 {...args}
110 allowsNewlines
111 defaultValue={TokenizingFieldValue.tokenize(
112 'This example automatically tokenizes #hashtags and @usernames in the text.',
113 /(?<=\s|^)[#@]\S+(?=\s)/g
114 )}>
115 {segment => <Token>{segment.text}</Token>}
116 </TokenField>
117);
118
119AutoTokenize.args = {
120 label: 'Message',

Callers

nothing calls this directly

Calls 1

tokenizeMethod · 0.45

Tested by

no test coverage detected