Skip to content

Commit

Permalink
Merge pull request #703 from WestpacGEL/kate-content-changes
Browse files Browse the repository at this point in the history
Kate content changes
  • Loading branch information
samithaf authored Feb 1, 2024
2 parents 623add0 + b0a2fd9 commit 436533b
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
] as const;

return (
<div className="flex flex-col gap-3">
<div className="flex flex-col gap-6">
<div>
<p className="mb-2 typography-body-10 text-muted">
<em>Examples showing pill style badge</em>
Expand All @@ -29,15 +29,15 @@
</Button>
<Button look="primary">
<div className="flex gap-1">
<Badge color="faint" type="pill">
<Badge color="faint" type="pill" soft>
88
</Badge>
<span>Label</span>
</div>
</Button>
<a className="text-link underline" href="#">
Messages
<Badge color="success" type="pill">
<Badge color="muted" type="pill" className="ml-1">
12
</Badge>
</a>
Expand All @@ -59,21 +59,21 @@
<Button look="primary">
<div className="flex gap-1 items-center">
<span>Label</span>
<Badge color="faint">NEW</Badge>
<Badge color="faint" soft>NEW</Badge>
</div>
</Button>

<a className="text-link underline" href="#">
Product feature
<Badge color="faint" ml-4>
<Badge color="muted" className="ml-1">
NEW
</Badge>
</a>


</div>
</div>
</div>
);
};

```
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
Badges come in 2 different styles, *Default* and *Pill.* Each style has 8 colour options, the Reserved colours as well as 4 brand colours. In general, badges can be used to highlight that something requires attention.
Badges come in 2 different styles: Default, used to highlight words, and Pill, used to highlight numbers.

### Badges - Default

```tsx
() => {
const COLORS = ['danger', 'warning', 'success', 'info', 'primary', 'hero', 'neutral', 'faint'] as const;

const COLORS = ['danger', 'warning', 'success', 'info', 'primary', 'hero', 'neutral', 'faint', 'muted'] as const;
return (
<div className="flex gap-1 flex-wrap w-[15.625rem]">
{COLORS.map(color => (
<Badge className="my-1" color={color}>
{color}
</Badge>
))}
<div className="flex flex-col gap-2">
<p className="typography-body-10 text-muted">
<em>Colours</em>
</p>
<div className="flex gap-2">
{COLORS.map(color => (
<Badge color={color} >
{color}
</Badge>
))}
</div>
<p className="typography-body-10 text-muted">
<em>Soft</em>
</p>
<div className="flex gap-2">
{COLORS.map(color => (
<Badge color={color} soft>
{color}
</Badge>
))}
</div>
</div>
);
};
Expand All @@ -22,15 +37,30 @@ Badges come in 2 different styles, *Default* and *Pill.* Each style has 8 colour

```tsx
() => {
const COLORS = ['danger', 'warning', 'success', 'info', 'primary', 'hero', 'neutral', 'faint'] as const;

const COLORS = ['danger', 'warning', 'success', 'info', 'primary', 'hero', 'neutral', 'faint', 'muted'] as const;
return (
<div className="flex gap-1 flex-wrap w-[12rem]">
{COLORS.map(color => (
<Badge className="my-1" type="pill" color={color}>
88
</Badge>
))}
<div className="flex flex-col gap-2">
<p className="typography-body-10 text-muted">
<em>Colours</em>
</p>
<div className="flex gap-2">
{COLORS.map(color => (
<Badge className="my-1" type="pill" color={color} >
88
</Badge>
))}
</div>
<p className="typography-body-10 text-muted">
<em>Soft</em>
</p>
<div className="flex gap-2">
{COLORS.map(color => (
<Badge className="my-1" type="pill" color={color} soft>
88
</Badge>
))}
</div>
</div>
);
};
Expand All @@ -53,7 +83,7 @@ Badges come in 2 different styles, *Default* and *Pill.* Each style has 8 colour
] as const;

return (
<div className="flex flex-col gap-3">
<div className="flex flex-col gap-6">
<div>
<p className="mb-2 typography-body-10 text-muted">
<em>Examples showing pill style badge</em>
Expand All @@ -69,15 +99,15 @@ Badges come in 2 different styles, *Default* and *Pill.* Each style has 8 colour
</Button>
<Button look="primary">
<div className="flex gap-1">
<Badge color="faint" type="pill">
<Badge color="faint" type="pill" soft>
88
</Badge>
<span>Label</span>
</div>
</Button>
<a className="text-link underline" href="#">
Messages
<Badge color="success" type="pill">
<Badge color="muted" type="pill" className="ml-1">
12
</Badge>
</a>
Expand All @@ -99,17 +129,18 @@ Badges come in 2 different styles, *Default* and *Pill.* Each style has 8 colour
<Button look="primary">
<div className="flex gap-1 items-center">
<span>Label</span>
<Badge color="faint">NEW</Badge>
<Badge color="faint" soft>NEW</Badge>
</div>
</Button>

<a className="text-link underline" href="#">
Product feature{' '}
<Badge color="faint" ml-4>
Product feature
<Badge color="muted" className="ml-1">
NEW
</Badge>
</a>


</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
needed.
namedExport:
discriminant: false
excludeFromNavbar: false
design:
- title:
name: Badge styles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
const clearInput = useCallback(() => setInputValue(''), []);

return (
<InputGroup
<InputGroup width={20}
label="Search"
before={{
icon: SearchIcon,
Expand All @@ -52,7 +52,7 @@
const toggleType = useCallback(() => setTypeInput(state => (state === 'password' ? 'text' : 'password')), []);

return (
<InputGroup
<InputGroup width={20}
label="Show and hide input visibility"
after={{
inset: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
icons and supporting text.
namedExport:
discriminant: false
excludeFromNavbar: false
design:
- title:
name: Add-ons
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Colours
description: >-
The colours specified below should be used for all Westpac user interfaces.
It’s important to understand how the colour system works in a multi-brand
environment and adhere to the accessibility guidelines.
namedExport:
discriminant: false
excludeFromNavbar: false
design:
- title:
name: Primary UI palette
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Fonts
description: >-
The font system allows each brand to designate two typefaces: A display font
for headings and a body font for editorial and UI elements.
The font system allows each brand to designate two typefaces, a brand font and
a body font.
namedExport:
discriminant: false
excludeFromNavbar: false
design:
- title:
name: Brand font
Expand Down

0 comments on commit 436533b

Please sign in to comment.