Clickablecomponent
Clickable(props: StylableClickableProps): ReactElement
| Param | Type | |
|---|---|---|
props | StylableClickableProps | Props for a clickable that also accepts a className for styling. required |
.className | string |
| Return | |
|---|---|
ReactElement |
Render either a <button>, an <a href="">, or a plain <span> based on whether an onClick or href prop is provided.
hrefrenders aLinkClickable;onClickrenders aButtonClickable; neither renders aSpanClickable.
Examples
<Clickable href="/about">About</Clickable>
<Clickable onClick={save}>Save</Clickable>