Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b0c1c57

Browse files
committedSep 23, 2024··
fix header font size and table label color
1 parent b734ae6 commit b0c1c57

File tree

7 files changed

+39
-9
lines changed

7 files changed

+39
-9
lines changed
 

‎packages/go-ui-storybook/src/stories/Alert.stories.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const Info: Story = {
3232
name: 'info',
3333
type: 'info',
3434
nonDismissable: true,
35-
description: 'This alert provides informative details to the user.',
35+
title: 'This alert provides informative details to the user.',
3636
},
3737
parameters: {
3838
design: {
@@ -48,7 +48,7 @@ export const Success: Story = {
4848
name: 'success',
4949
type: 'success',
5050
nonDismissable: true,
51-
description: 'This alert indicates a successful operation or task.',
51+
title: 'This alert indicates a successful operation or task.',
5252
},
5353
parameters: {
5454
design: {
@@ -64,7 +64,7 @@ export const Warning : Story = {
6464
name: 'warning',
6565
type: 'warning',
6666
nonDismissable: true,
67-
description: 'This alert warns the user about potential issues or risks.',
67+
title: 'This alert warns the user about potential issues or risks.',
6868
},
6969
};
7070

@@ -73,7 +73,7 @@ export const Danger : Story = {
7373
name: 'danger',
7474
type: 'danger',
7575
nonDismissable: true,
76-
description: 'This alert indicates a dangerous or potentially harmful situation.',
76+
title: 'This alert indicates a dangerous or potentially harmful situation.',
7777
},
7878
parameters: {
7979
design: {
@@ -88,7 +88,7 @@ export const NonDismissable: Story = {
8888
args: {
8989
name: 'danger',
9090
type: 'danger',
91-
description: 'This alert indicates a dangerous or potentially harmful situation.',
91+
title: 'This alert indicates a dangerous or potentially harmful situation.',
9292
nonDismissable: true,
9393
},
9494
};

‎packages/go-ui-storybook/src/stories/Breadcrumbs.stories.tsx

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
1+
import { ArrowDropRightLineIcon } from '@ifrc-go/icons';
12
import type {
23
Meta,
34
StoryObj,
45
} from '@storybook/react';
56

67
import Breadcrumbs from './Breadcrumbs';
78

9+
interface Datum {
10+
id: number;
11+
label: string;
12+
}
13+
14+
const data: Datum[] = [
15+
{ id: 1, label: 'Home' },
16+
{ id: 2, label: 'Africa' },
17+
{ id: 3, label: 'Benin' },
18+
];
19+
20+
const keySelector = (datum: Datum) => datum.id;
21+
const labelSelector = (datum: Datum) => datum.label;
22+
const rendererParams = () => ({});
23+
824
type Story = StoryObj<typeof Breadcrumbs>;
925

1026
const meta: Meta<typeof Breadcrumbs> = {
@@ -25,7 +41,13 @@ export default meta;
2541

2642
export const Default: Story = {
2743
args: {
28-
children: ['Home', 'Africa', 'Angola'],
44+
data,
45+
keySelector,
46+
labelSelector,
47+
rendererParams,
48+
// eslint-disable-next-line react/jsx-props-no-spreading
49+
renderer: (props) => <div {...props} />,
50+
separator: <ArrowDropRightLineIcon />,
2951
},
3052
};
3153

‎packages/go-ui-storybook/src/stories/Breadcrumbs.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import {
33
BreadcrumbsProps,
44
} from '@ifrc-go/ui';
55

6-
function Breadcrumbs(props: BreadcrumbsProps) {
6+
function Breadcrumbs<KEY, DATUM, RENDERER_PROPS extends { children: React.ReactNode }>(
7+
props: BreadcrumbsProps<KEY, DATUM, RENDERER_PROPS>,
8+
) {
79
return (
810
<PureBreadcrumbs {...props} /> // eslint-disable-line react/jsx-props-no-spreading
911
);

‎packages/go-ui-storybook/src/stories/Header.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const Default: Story = {
3131
args: {
3232
heading: 'Overview of the International Federation of Red Cross and Red Crescent Societies (IFRC)',
3333
headingDescription: 'The International Federation of Red Cross and Red Crescent Societies (IFRC) is the world’s largest humanitarian network.',
34-
headingLevel: 2,
34+
headingLevel: 1,
3535
headingContainerClassName: 'header-children',
3636
},
3737
};

‎packages/go-ui-storybook/src/stories/Table.stories.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ export const Default: Story = {
277277
filtered: false,
278278
pending: false,
279279
headersHidden: false,
280+
headerRowClassName: 'table-header-row',
280281
},
281282
};
282283

@@ -287,6 +288,7 @@ export const WithHeadersHidden: Story = {
287288
keySelector,
288289
caption: 'Animal Information Dataset',
289290
headersHidden: true,
291+
headerRowClassName: 'table-header-row',
290292
},
291293
};
292294

@@ -297,6 +299,7 @@ export const WithFixedColumnWidth: Story = {
297299
keySelector,
298300
caption: 'All columns utilize fixed width formatting.',
299301
fixedColumnWidth: true,
302+
headerRowClassName: 'table-header-row',
300303
},
301304
};
302305

@@ -307,5 +310,6 @@ export const WithResizableColumn: Story = {
307310
keySelector,
308311
caption: 'You can utilize the header column to adjust the width of each column.',
309312
resizableColumn: true,
313+
headerRowClassName: 'table-header-row',
310314
},
311315
};

‎packages/go-ui-storybook/src/stories/index.css

+3
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,7 @@
177177
.table-link:hover {
178178
color: var(--go-ui-color-primary-red);
179179
}
180+
.table-header-row {
181+
background:var(--go-ui-color-primary-gray-10);
182+
}
180183

‎packages/ui/src/components/Heading/styles.module.css

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
margin: 0;
55
line-height: var(--line-height);
66
font-size: var(--font-size);
7-
font-weight: 500;
87

98
&.modal-font-weight {
109
font-weight: var(--go-ui-font-weight-medium);

0 commit comments

Comments
 (0)
Please sign in to comment.