0.0.4-alpha.15 • Published 2 years ago

@graffft-waggle/kopf v0.0.4-alpha.15

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

filename: /packages/organisms/Kopf.tsx

Kopf API

The API documentation of the Kopf Graffft Waggle component.

Import

import { Kopf } from '@graffft-waggle/kopf';

Kopf

Required Props

interface KopfHeaderNavItem {
  key: string;
  navItem: string | number | JSX.Element;
  navItemColor: string;
  navItemBgHoverColor: string;
}
NameTypeDescription
headerLogostring\|number\|JSX.ElementMain header logo
headerNavItemsKopfHeaderNavItem[]Nav items in header
export enum KopfHeaderLogoPostion {
  LEFT = 'left',
  RIGHT = 'right',
}

Optional Props

NameTypeDefaultDescription
isFixedbooleantrueif true, header is fixed to the top
headerMaxWidthstring1800pxmax width for header
sideNavDisabledbooleanfalseLogo needed to enable sidenav
sideNavLogostring\|number\|JSX.ElementundefinedLogo needed to enable sidenav
desktopMinWidthnumber768Min-width for non-mobile devices
headerBackgroundColorstring#fffHeader background color
headerBoxShadowstring'0 1px 2px 0 rgba(60,64,67,0.3), 0 2px 6px 2px rgba(60,64,67,0.15)'Header box shadow
headerBurgerColorstring#000Header burger color
headerHeightstring60pxHeader height
headerLogoPositionKopfHeaderLogoPostionleftHeader logo position
headerNavItemHorizontalPaddingstring0px 16pxPadding around each nav item
headerMobilePaddingstring0px 16pxHeader mobile padding
headerPaddingstring0px 24pxHeader padding
headerZIndexnumber200Header z-index
mobileMenuOpenbooleanfalsemobile menu open state
handleToggleMobileMenu() => void() => {}callback for toggling mobile menu
handleCloseMobileMenu() => void() => {}callback for closing mobile menu
customScssstring''custom scss for wrapper element

Demos

  • TODO