File tree 3 files changed +28
-1
lines changed
@navikt/core/react/src/typography
aksel.nav.no/website/pages/eksempler/errormessage
3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ export interface ErrorMessageProps
16
16
* Error text.
17
17
*/
18
18
children : React . ReactNode ;
19
-
20
19
/**
21
20
* Render a triangular warning icon.
22
21
*/
Original file line number Diff line number Diff line change
1
+ import { ErrorMessage , VStack } from "@navikt/ds-react" ;
2
+ import { withDsExample } from "@/web/examples/withDsExample" ;
3
+
4
+ const Example = ( ) => {
5
+ const exampeText = "Du må fylle ut tekstfeltet før innsending." ;
6
+
7
+ return (
8
+ < VStack gap = "5" >
9
+ < ErrorMessage showIcon > { exampeText } </ ErrorMessage >
10
+
11
+ < ErrorMessage showIcon size = "small" >
12
+ { exampeText }
13
+ </ ErrorMessage >
14
+ </ VStack >
15
+ ) ;
16
+ } ;
17
+
18
+ // EXAMPLES DO NOT INCLUDE CONTENT BELOW THIS LINE
19
+ export default withDsExample ( Example , { variant : "full" } ) ;
20
+
21
+ /* Storybook story */
22
+ export const Demo = {
23
+ render : Example ,
24
+ } ;
25
+
26
+ export const args = {
27
+ index : 1 ,
28
+ } ;
File renamed without changes.
You can’t perform that action at this time.
0 commit comments