Skip to content

Commit

Permalink
Merge pull request #764 from WestpacGEL/kate-header-page
Browse files Browse the repository at this point in the history
Kate header page
  • Loading branch information
jaortiz authored Mar 26, 2024
2 parents a9d8fd0 + 271835f commit 93ac8d7
Show file tree
Hide file tree
Showing 13 changed files with 184 additions and 142 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
they are in.
namedExport:
discriminant: false
excludeFromNavbar: false
excludeFromNavbar: true
design:
- title:
name: Footer
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
### Default

Default usage example

```tsx
<>
<Header brand="wbc" />
</>
```

### Right button

Example with a button on the right

```tsx
<>
<Header brand="wbc">
<Button
look="faint"
onClick={function Ya(){}}
size={{
initial: 'small',
sm: 'medium'
}}
soft
>
Sign Out
</Button>
</Header>
</>
```

### Centre at XSL

Example of logo centering when XSL

```tsx
<>
<Header
brand="wbc"
logoCenter
/>
</>
```

### Logo onClick

Example of logo with onClick

```tsx
<>
<Header
brand="wbc"
logoOnClick={function Ya(){}}
/>
</>
```

### Logo with skiplink

Example of header with skiplink

```tsx
<>
<Header
brand="wbc"
skipToContentId="#"
/>
</>
```

### Fixed

Example fixed header. Does not show correctly in Docs view as it will show how it looks when scrolled, check specific story for non-scrolled view.

```tsx
<div className="h-10">
<Header
brand="wbc"
fixed
/>
</div>
```

### With back arrow

Example of header with arrow button

```tsx
<>
<Header
brand="wbc"
leftIcon="arrow"
/>
</>
```

### With back arrow onClick

Example of header with back arrow button with onClick

```tsx
<>
<Header
brand="wbc"
leftIcon="arrow"
leftOnClick={function Ya(){}}
/>
</>
```

### With hamburger

Example of header with hamburger (only visible below xsl) with onClick

```tsx
<>
<Header
brand="wbc"
leftIcon="hamburger"
/>
</>
```

### With hamburger onClick

Example of header with hamburger (only visible below xsl) with onClick

```tsx
<>
<Header
brand="wbc"
leftIcon="hamburger"
leftOnClick={function Ya(){}}
/>
</>
```

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
```tsx
<div className="flex flex-col gap-4">
<div><ComponentTitle>Default</ComponentTitle>
<>
<Header brand="wbc" />
</>
</></div>

<div><ComponentTitle>With Sign Out </ComponentTitle>
<>
<Header brand="wbc">
<Button
look="faint"
onClick={function Ya(){}}
size={{
initial: 'small',
sm: 'medium'
}}
soft
>
Sign Out
</Button>
</Header>
</></div>

<div><ComponentTitle>Logo in centre at small views (see demo)</ComponentTitle>
<>
<Header
brand="wbc"
logoCenter
/>
</></div>
<div> <ComponentTitle>With back arrow</ComponentTitle>
<>
<Header
brand="wbc"
leftIcon="arrow"
/>
</></div>
<div>
<ComponentTitle>With hamburger at small views (see demo)</ComponentTitle>
<>
<Header
brand="wbc"
leftIcon="hamburger"
/>
</></div>
</div>
```
40 changes: 2 additions & 38 deletions apps/site/src/content/design-system/components/header/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,42 +31,6 @@ relatedComponents:
slug: /components/footers
code:
- title:
name: Default
slug: default
noTitle: false
- title:
name: Right button
slug: right-button
noTitle: false
- title:
name: Center at Xsl
slug: center-at-xsl
noTitle: false
- title:
name: Logo on click
slug: logo-on-click
noTitle: false
- title:
name: Logo with skip link
slug: logo-with-skip-link
noTitle: false
- title:
name: Fixed
slug: fixed
noTitle: false
- title:
name: With back arrow
slug: with-back-arrow
noTitle: false
- title:
name: With back arrow on click
slug: with-back-arrow-on-click
noTitle: false
- title:
name: With hamburger
slug: with-hamburger
noTitle: false
- title:
name: With hamburger on click
slug: with-hamburger-on-click
name: Development examples
slug: development-examples
noTitle: false

0 comments on commit 93ac8d7

Please sign in to comment.