@netdata/netdata-ui
Version:
netdata UI kit
51 lines (37 loc) • 908 B
Markdown
interface Props {
id?: string
ref?: React.MutableRefObject<HTMLInputElement>
className?: string
label?: string
onClick?: (e: SyntheticEvent<HTMLButtonElement>) => void
icon?: Icon
isLoading?: boolean
type?: ButtonType
disabled?: boolean
}
```
```typescript
type ButtonType = "default" | "hollow" | "borderless",
```
```typescript
const myButton: Button = <Button icon={"github"} onClick={this.myHandler} label="Press me" />
```
```typescript
const myButton: Button = (
<Button type={ButtonTypes.hollow} onClick={this.myHandler} label="Press me" />
)
```
Please note `"default"` is optional (can be omitted):
```typescript
const myButton: Button = (
<Button disabled={true} type="default" icon={"plus"} onClick={this.myHandler} label="Press me" />
)
```
```typescript