Options
All
  • Public
  • Public/Protected
  • All
Menu

<drayman-button />

Button powered by Angular Material library.

Example of usage

export const component: DraymanComponent = async ({ forceUpdate }) => {
    let counter = 0;

    return () => {

        return (
            <div>
                <drayman-button
                    label="Click me"
                    onClick={async () => {
                        counter++;
                        await forceUpdate();
                    }}
                />
                <p>Button was clicked {counter} times</p>
            </div>
        );
    }
}

Hierarchy

Index

Properties

Optional buttonIconStyle

buttonIconStyle: any

Optional buttonRef

buttonRef: string

Reference to the button.

Optional buttonStyle

buttonStyle: any

Optional disabled

disabled: boolean

Wether button should be disabled.

Optional icon

icon: string

Name of the Material icon printed inside button.

Optional imgUrl

imgUrl: string

Image shown on hover.

Optional label

label: string

Caption inside button. Button by default.

Optional onClick

onClick: ElementEvent<{}>

Executed when user clicks a button.

Optional popup

popup: { style?: any; text: string }

Type declaration

  • Optional style?: any
  • text: string

Optional ref

ref: string

Optional style

style: CSS

Optional tooltip

tooltip: string

Tooltip shown on hover.

Optional view

view: "basic" | "raised" | "flat" | "stroked" | "icon" | "fab" | "miniFab" | "unstyled"

Material style of the button. basic by default.