Ikonknapper

Denne pakken inneholder en samling med ferdig-komponerte knapper med tilhørende ikon.

NPM-pakke

Navn:nav-frontend-ikonknapper
Siste versjon:1.0.25
Peer dependencies:nav-frontend-chevron nav-frontend-ikoner-assets nav-frontend-knapper react

Installering

npm install nav-frontend-ikonknapper nav-frontend-chevron classnames nav-frontend-chevron-style prop-types react nav-frontend-ikoner-assets nav-frontend-knapper nav-frontend-js-utils lodash.throttle nav-frontend-knapper-style nav-frontend-core nav-frontend-typografi-style --save

Kopiert!


yarn add nav-frontend-ikonknapper nav-frontend-chevron classnames nav-frontend-chevron-style prop-types react nav-frontend-ikoner-assets nav-frontend-knapper nav-frontend-js-utils lodash.throttle nav-frontend-knapper-style nav-frontend-core nav-frontend-typografi-style

Kopiert!

Moduler

Import

import { Hamburgerknapp } from 'nav-frontend-ikonknapper';

Kopiert!

React props

PropertyTypeDefaultRequiredDescription
autoDisableVedSpinner
boolean
-
-
autoFocus
boolean
-
-
disabled
boolean
-
-
form
string
-
-
formAction
string
-
-
formEncType
string
-
-
formMethod
string
-
-
formNoValidate
boolean
-
-
formTarget
string
-
-
htmlType
"submit" | "button" | "reset"
-
Verdi for <button/>-attributtet 'type', angir knappens default funksjon
inaktivKlasseVedDisabled
boolean
-
-
kompakt
boolean
-
Innstillinger for å endre på knappens form.
mini
boolean
-
Tettere, 32px høy variant
name
string
-
-
onClick
(event: MouseEvent<HTMLButtonElement, MouseEvent>) => void
-
-
spinner
boolean
-
Knapp med spinner
type
"standard" | "hoved" | "fare" | "flat"
-
Varianter å velge mellom
value
string | number | string[]
-
-