Skip to content

Commit cd40f05

Browse files
Merge branch 'master' into fix/horizontal-scrollbar-size
2 parents 3c0b7ee + 330d639 commit cd40f05

File tree

13 files changed

+877
-541
lines changed

13 files changed

+877
-541
lines changed

.storybook/preview.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,12 @@ const withQuery = makeDecorator({
6666

6767
addDecorator(withQuery);
6868

69-
export const globalArgTypes = {
69+
export const globalTypes = {
7070
theme: {
7171
name: 'Theme',
7272
description: 'Fiori Theme',
7373
defaultValue: Themes.sap_fiori_3,
7474
toolbar: {
75-
icon: 'paintbrush',
7675
items: [
7776
{
7877
value: Themes.sap_fiori_3,
@@ -102,7 +101,6 @@ export const globalArgTypes = {
102101
description: 'Content Density',
103102
defaultValue: ContentDensity.Cozy,
104103
toolbar: {
105-
icon: 'component',
106104
items: [
107105
{
108106
value: ContentDensity.Cozy,
@@ -120,17 +118,14 @@ export const globalArgTypes = {
120118
description: 'Text Direction',
121119
defaultValue: 'ltr',
122120
toolbar: {
123-
icon: 'transfer',
124121
items: [
125122
{
126123
value: 'ltr',
127-
title: 'LTR',
128-
icon: 'arrowrightalt'
124+
title: 'LTR'
129125
},
130126
{
131127
value: 'rtl',
132-
title: 'RTL',
133-
icon: 'arrowleftalt'
128+
title: 'RTL'
134129
}
135130
]
136131
}

.storybook/theme.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const Fiori4ReactTheme = create({
66
base: 'light',
77

88
colorPrimary: TEXT_COLOR, //'#000000',
9-
colorSecondary: '#0a6ed1',
9+
colorSecondary: PRIMARY_COLOR,
1010

1111
// UI
1212
appBg: '#edeff0',
@@ -24,7 +24,7 @@ export const Fiori4ReactTheme = create({
2424

2525
// Toolbar default and active colors
2626
barTextColor: '#ffffff',
27-
barSelectedColor: PRIMARY_COLOR,
27+
barSelectedColor: '#ffffff',
2828
barBg: '#354a5f',
2929

3030
// Form colors
@@ -42,6 +42,6 @@ export const Fiori4ReactTheme = create({
4242
* URL for name in top left corner to link to
4343
* @type {String}
4444
*/
45-
brandUrl: '#'
46-
// // brandImage: 'https://placehold.it/350x150'
45+
brandUrl: 'https://sap.github.io/ui5-webcomponents-react',
46+
brandImage: 'https://raw.githubusercontent.com/SAP/ui5-webcomponents-react/master/assets/Logo.png'
4747
});

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<a name="top"></a>
2-
# UI5 Web Components for React
2+
<p align="center">
3+
<img src="https://raw.githubusercontent.com/SAP/ui5-webcomponents-react/master/assets/Logo.png" alt="UI5 Web Components for React Logo" />
4+
</p>
35
<p align="center">
46
<a href="https://github.com/SAP/ui5-webcomponents-react/actions?query=workflow:%22build%22" target="_blank">
57
<img alt="Build Status" src="https://github.com/SAP/ui5-webcomponents-react/workflows/build/badge.svg">

assets/Logo.png

23.7 KB
Loading

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
"lerna:version-dryrun": "lerna version --conventional-graduate --no-git-tag-version --no-push"
2121
},
2222
"dependencies": {
23-
"@storybook/addon-actions": "6.0.0-rc.0",
24-
"@storybook/addon-controls": "6.0.0-rc.0",
25-
"@storybook/addon-docs": "6.0.0-rc.0",
26-
"@storybook/addon-knobs": "6.0.0-rc.0",
27-
"@storybook/addon-toolbars": "6.0.0-rc.0",
28-
"@storybook/addons": "6.0.0-rc.0",
29-
"@storybook/cli": "6.0.0-rc.0",
30-
"@storybook/react": "6.0.0-rc.0",
31-
"@storybook/theming": "6.0.0-rc.0",
23+
"@storybook/addon-actions": "6.0.0-rc.1",
24+
"@storybook/addon-controls": "6.0.0-rc.1",
25+
"@storybook/addon-docs": "6.0.0-rc.1",
26+
"@storybook/addon-knobs": "6.0.0-rc.1",
27+
"@storybook/addon-toolbars": "6.0.0-rc.1",
28+
"@storybook/addons": "6.0.0-rc.1",
29+
"@storybook/cli": "6.0.0-rc.1",
30+
"@storybook/react": "6.0.0-rc.1",
31+
"@storybook/theming": "6.0.0-rc.1",
3232
"@ui5/webcomponents": "1.0.0-rc.7",
3333
"@ui5/webcomponents-fiori": "1.0.0-rc.7",
3434
"@ui5/webcomponents-icons": "1.0.0-rc.7",
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
import { Meta, Title, Description, Story, Preview, Props } from '@storybook/addon-docs/blocks';
2+
import { MicroBarChart } from '@ui5/webcomponents-react-charts/lib/MicroBarChart';
3+
4+
<Meta
5+
title="Charts / MicroBarChart"
6+
component={MicroBarChart}
7+
argTypes={{
8+
dataset: { type: null },
9+
dimension: { type: null },
10+
measure: { type: null }
11+
}}
12+
args={{
13+
dataset: [
14+
{
15+
name: 'January',
16+
data: 100
17+
},
18+
{
19+
name: 'February',
20+
data: 300
21+
},
22+
{
23+
name: 'March',
24+
data: 530
25+
},
26+
{
27+
name: 'April',
28+
data: 200
29+
}
30+
]
31+
}}
32+
/>
33+
34+
<Title />
35+
<Description />
36+
37+
<Preview>
38+
<Story name="Default">
39+
{(args) => (
40+
<MicroBarChart
41+
dataset={args.dataset}
42+
loading={args.loading}
43+
style={{ width: '100%' }}
44+
dimension={{
45+
accessor: 'name'
46+
}}
47+
measure={{
48+
accessor: 'data'
49+
}}
50+
/>
51+
)}
52+
</Story>
53+
</Preview>
54+
55+
<Props story="Default" of={MicroBarChart} />
56+
57+
<Preview>
58+
<Story name="With custom props">
59+
{(args) => (
60+
<MicroBarChart
61+
onDataPointClick={args.onDataPointClick}
62+
dataset={args.dataset}
63+
style={{ width: '50%' }}
64+
loading={args.loading}
65+
dimension={{
66+
accessor: 'name'
67+
}}
68+
measure={{
69+
accessor: 'data',
70+
colors: ['#f0ab00', 'var(--sapHighlightColor)'],
71+
formatter: (d) => (d > 200 ? 'over 200' : 'lower'),
72+
width: 16
73+
}}
74+
/>
75+
)}
76+
</Story>
77+
</Preview>
78+
79+
<Preview>
80+
<Story name="Loading Placeholder">
81+
<MicroBarChart
82+
dataset={[]}
83+
dimension={{
84+
accessor: 'name'
85+
}}
86+
measure={{
87+
accessor: 'data'
88+
}}
89+
style={{ width: '20%' }}
90+
/>
91+
</Story>
92+
</Preview>

packages/charts/src/components/MicroBarChart/MicroBarChart.stories.tsx

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)