1
1
import { Description , DocsContext , Subtitle , Title } from '@storybook/addon-docs' ;
2
- import copyIcon from '@ui5/webcomponents-icons/dist/copy' ;
3
2
import ButtonDesign from '@ui5/webcomponents/dist/types/ButtonDesign.js' ;
4
- import { Button , FlexBox , FlexBoxAlignItems , Label , Link , Text , ThemeProvider } from '@ui5/webcomponents-react' ;
3
+ import MessageStripDesign from '@ui5/webcomponents/dist/types/MessageStripDesign.js' ;
4
+ import copyIcon from '@ui5/webcomponents-icons/dist/copy.js' ;
5
+ import {
6
+ Button ,
7
+ FlexBox ,
8
+ FlexBoxAlignItems ,
9
+ Label ,
10
+ Link ,
11
+ MessageStrip ,
12
+ Text ,
13
+ ThemeProvider
14
+ } from '@ui5/webcomponents-react' ;
5
15
import { clsx } from 'clsx' ;
6
16
import { useContext } from 'react' ;
7
17
import { useGetSubComponentsOfModule } from '../utils' ;
@@ -38,6 +48,7 @@ interface InfoTableProps {
38
48
since ?: string ;
39
49
subComponents ?: string [ ] ;
40
50
mergeSubComponents ?: boolean ;
51
+ isChart ?: boolean ;
41
52
}
42
53
43
54
export const InfoTable = ( { since, subComponents, mergeSubComponents } : InfoTableProps ) => {
@@ -74,7 +85,7 @@ export const InfoTable = ({ since, subComponents, mergeSubComponents }: InfoTabl
74
85
< Button
75
86
design = { ButtonDesign . Transparent }
76
87
className = { clsx ( 'ui5-content-density-compact' , classes . copyBtn ) }
77
- onClick = { handleCopy }
88
+ onClick = { void handleCopy }
78
89
icon = { copyIcon }
79
90
tooltip = "copy"
80
91
/>
@@ -102,7 +113,7 @@ export const InfoTable = ({ since, subComponents, mergeSubComponents }: InfoTabl
102
113
< Button
103
114
design = { ButtonDesign . Transparent }
104
115
className = { clsx ( 'ui5-content-density-compact' , classes . copyBtn ) }
105
- onClick = { handleCopy }
116
+ onClick = { void handleCopy }
106
117
icon = { copyIcon }
107
118
tooltip = "copy"
108
119
/>
@@ -115,7 +126,7 @@ export const InfoTable = ({ since, subComponents, mergeSubComponents }: InfoTabl
115
126
) ;
116
127
} ;
117
128
118
- export const DocsHeader = ( { since, subComponents, mergeSubComponents } : InfoTableProps ) => {
129
+ export const DocsHeader = ( { since, subComponents, mergeSubComponents, isChart } : InfoTableProps ) => {
119
130
return (
120
131
< ThemeProvider >
121
132
< FlexBox alignItems = { FlexBoxAlignItems . Center } >
@@ -127,6 +138,16 @@ export const DocsHeader = ({ since, subComponents, mergeSubComponents }: InfoTab
127
138
< InfoTable since = { since } subComponents = { subComponents } mergeSubComponents = { mergeSubComponents } />
128
139
< TableOfContent />
129
140
< Description />
141
+ { isChart && (
142
+ < >
143
+ < MessageStrip hideCloseButton design = { MessageStripDesign . Critical } >
144
+ Charts only offer limited accessibility support with only basic built-in features, so it’s essential to
145
+ ensure your implementation meets the accessibility standards of your application.
146
+ </ MessageStrip >
147
+ < br />
148
+ < br />
149
+ </ >
150
+ ) }
130
151
</ ThemeProvider >
131
152
) ;
132
153
} ;
0 commit comments