action api docsaction and/or <Icon /> whilst attaching addition attrs/props to it (e.g. onClick, className, etc)<Icon /> without attaching any other attrs0.71.3
https://codepen.io/cdaringe/pen/YxZyPR
mentioned in chat, sans any real discussion: https://gitter.im/Semantic-Org/Semantic-UI-React?at=5988b080bc464729746030e4
actually, i found that onClick seems to be honored in the action API. is it stable/safe to use?
@cdaringe Semantic UI accepts only button as action, that's why your first Input looks ugly.
The action prop on Input implements a shorthand for Button, so code below is equal:
<Input action={<Button icon='delete' onClick={onIconClick} />} />
<Input action={{ icon: 'delete', onClick: onIconClick }} />
Shorthands should be better documented and issue already exists #561.
@layershifter thanks, this was a little unclear to me but it all makes sense now. the documentation could be clearer on this.
How do I pass the value entered in Input and handle it with the help of Button?
Please use StackOverflow to usage questions.
Most helpful comment
@cdaringe Semantic UI accepts only button as action, that's why your first
Inputlooks ugly.The
actionprop onInputimplements a shorthand forButton, so code below is equal:Shorthands should be better documented and issue already exists #561.