@ndla/ui 35.0.27 → 35.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/es/Animation/DisplayOnPageYOffset.js +4 -2
  2. package/es/Article/Article.js +5 -3
  3. package/es/Article/ArticleContent.js +4 -1
  4. package/es/Article/ArticleHeaderWrapper.js +6 -3
  5. package/es/Aside/Aside.js +4 -1
  6. package/es/AudioPlayer/AudioPlayer.js +2 -2
  7. package/es/AudioPlayer/Controls.js +2 -2
  8. package/es/Breadcrumb/Breadcrumb.js +6 -3
  9. package/es/Breadcrumblist/Breadcrumblist.js +2 -2
  10. package/es/CompetenceGoalTab/CompetenceGoalTab.js +2 -2
  11. package/es/CompetenceGoals/CompetenceGoalsDialog.js +4 -1
  12. package/es/ContactBlock/ContactBlock.js +150 -0
  13. package/es/ContactBlock/index.js +9 -0
  14. package/es/ContentCard/ContentCard.js +4 -1
  15. package/es/ContentLoader/index.js +4 -1
  16. package/es/ContentTypeBadge/ContentTypeBadge.js +4 -1
  17. package/es/CopyParagraphButton/CopyParagraphButton.js +2 -2
  18. package/es/CopyParagraphButton/CopyParagraphButtonV2.js +2 -2
  19. package/es/Dialog/Dialog.js +4 -1
  20. package/es/Embed/AudioEmbed.js +2 -2
  21. package/es/Embed/BrightcoveEmbed.js +6 -3
  22. package/es/Embed/ConceptEmbed.js +2 -2
  23. package/es/Embed/ImageEmbed.js +2 -2
  24. package/es/Embed/conceptComponents.js +4 -1
  25. package/es/FactBox/FactBox.js +4 -1
  26. package/es/FactBox/FactBoxV2.js +6 -3
  27. package/es/Figure/Figure.js +4 -1
  28. package/es/Figure/FigureLicense.js +4 -1
  29. package/es/Figure/FigureLicenseDialog.js +4 -1
  30. package/es/Figure/FigureLicenseDialogContent.js +4 -1
  31. package/es/Filter/FilterButtons.js +2 -2
  32. package/es/Filter/FilterCarousel.js +6 -3
  33. package/es/Filter/FilterList.js +6 -3
  34. package/es/Filter/FilterListPhone.js +6 -3
  35. package/es/Filter/ToggleItem.js +4 -1
  36. package/es/Footer/FooterAuth.js +4 -1
  37. package/es/Frontpage/FrontpageAllSubjects.js +1 -1
  38. package/es/Frontpage/FrontpageProgramMenu.js +2 -2
  39. package/es/Hero/Hero.js +4 -1
  40. package/es/Image/Image.js +4 -1
  41. package/es/Image/ImageLink.js +4 -1
  42. package/es/Image/LazyLoadImage.js +4 -1
  43. package/es/KeyPerformanceIndicator/KeyPerformanceIndicator.js +57 -0
  44. package/es/KeyPerformanceIndicator/index.js +9 -0
  45. package/es/Layout/PageContainer.js +4 -1
  46. package/es/LearningPaths/LearningPathMenu.js +2 -2
  47. package/es/Logo/Logo.js +4 -1
  48. package/es/Logo/SvgLogo.js +4 -1
  49. package/es/Masthead/MastheadAuthModal.js +4 -1
  50. package/es/Masthead/utils.js +2 -2
  51. package/es/MediaList/MediaList.js +4 -1
  52. package/es/MultidisciplinarySubject/List.js +4 -1
  53. package/es/MyNdla/Resource/FolderInput.js +4 -1
  54. package/es/NDLAFilm/AllMoviesAlphabetically.js +2 -2
  55. package/es/NDLAFilm/CategorySelect.js +2 -2
  56. package/es/NDLAFilm/FilmMovieList.js +4 -1
  57. package/es/NDLAFilm/FilmSlideshow.js +6 -3
  58. package/es/Notion/ConceptNotion.js +1 -1
  59. package/es/Notion/FigureNotion.js +1 -1
  60. package/es/RadioButtonGroup/RadioButtonGroup.js +4 -2
  61. package/es/RelatedArticleList/RelatedArticleList.js +4 -1
  62. package/es/RelatedArticleList/RelatedArticleV2.js +6 -3
  63. package/es/ResourceGroup/ResourceList.js +4 -1
  64. package/es/ResourcesWrapper/ResourcesWrapper.js +4 -1
  65. package/es/Search/ContentTypeResult.js +6 -3
  66. package/es/Search/SearchField.js +4 -1
  67. package/es/Search/SearchResult.js +3 -1
  68. package/es/Search/SearchResultSleeve.js +2 -2
  69. package/es/Search/ToggleSearchButton.js +4 -1
  70. package/es/SearchTypeResult/PopupFilter.js +2 -2
  71. package/es/SearchTypeResult/SearchFieldHeader.js +2 -2
  72. package/es/SearchTypeResult/SearchHeader.js +2 -2
  73. package/es/SearchTypeResult/SearchTypeResult.js +4 -1
  74. package/es/SearchTypeResult/components/SubjectFilters.js +6 -3
  75. package/es/SnackBar/SnackbarProvider.js +6 -3
  76. package/es/Table/Table.js +6 -3
  77. package/es/TagSelector/Control.js +4 -1
  78. package/es/TagSelector/DropdownIndicator.js +4 -1
  79. package/es/TagSelector/Input.js +4 -1
  80. package/es/TagSelector/Menu.js +4 -1
  81. package/es/TagSelector/MenuList.js +4 -1
  82. package/es/TagSelector/Option.js +4 -1
  83. package/es/TagSelector/SelectContainer.js +4 -1
  84. package/es/TagSelector/TagSelector.js +6 -3
  85. package/es/TagSelector/ValueButton.js +4 -1
  86. package/es/Translation/Translation.js +4 -1
  87. package/es/Translation/TranslationLine.js +4 -1
  88. package/es/TreeStructure/FolderItem.js +53 -22
  89. package/es/TreeStructure/FolderItems.js +4 -1
  90. package/es/TreeStructure/TreeStructure.js +2 -2
  91. package/es/TreeStructure/helperFunctions.js +4 -1
  92. package/es/User/UserInfo.js +2 -2
  93. package/es/User/parseUserObject.js +6 -3
  94. package/es/all.css +1 -1
  95. package/es/index.js +4 -1
  96. package/es/locale/messages-en.js +6 -1
  97. package/es/locale/messages-nb.js +6 -1
  98. package/es/locale/messages-nn.js +6 -1
  99. package/es/locale/messages-se.js +83 -78
  100. package/es/locale/messages-sma.js +6 -1
  101. package/es/model/ContentType.js +4 -1
  102. package/lib/Animation/DisplayOnPageYOffset.js +11 -3
  103. package/lib/Article/Article.js +12 -4
  104. package/lib/Article/ArticleAccessMessage.js +7 -1
  105. package/lib/Article/ArticleByline.js +7 -1
  106. package/lib/Article/ArticleContent.js +10 -1
  107. package/lib/Article/ArticleHeaderWrapper.js +12 -4
  108. package/lib/Aside/Aside.js +10 -1
  109. package/lib/AudioPlayer/AudioPlayer.js +9 -3
  110. package/lib/AudioPlayer/Controls.js +9 -3
  111. package/lib/Breadcrumb/Breadcrumb.js +12 -4
  112. package/lib/Breadcrumb/BreadcrumbItem.js +7 -1
  113. package/lib/Breadcrumb/HomeBreadcrumb.js +7 -1
  114. package/lib/Breadcrumblist/Breadcrumblist.js +9 -3
  115. package/lib/CompetenceGoalTab/CompetenceGoalItem.js +7 -1
  116. package/lib/CompetenceGoalTab/CompetenceGoalTab.js +9 -3
  117. package/lib/CompetenceGoalTab/CompetenceItem.js +7 -1
  118. package/lib/CompetenceGoals/CompetenceGoalsDialog.js +10 -2
  119. package/lib/ContactBlock/ContactBlock.d.ts +20 -0
  120. package/lib/ContactBlock/ContactBlock.js +154 -0
  121. package/lib/ContactBlock/index.d.ts +9 -0
  122. package/lib/ContactBlock/index.js +17 -0
  123. package/lib/ContentCard/ContentCard.js +4 -1
  124. package/lib/ContentLoader/index.js +11 -1
  125. package/lib/ContentPlaceholder/ContentPlaceholder.js +7 -1
  126. package/lib/ContentTypeBadge/ContentTypeBadge.js +4 -2
  127. package/lib/CopyParagraphButton/CopyParagraphButton.js +9 -3
  128. package/lib/CopyParagraphButton/CopyParagraphButtonV2.js +9 -3
  129. package/lib/CreatedBy/CreatedBy.js +7 -1
  130. package/lib/Dialog/Dialog.js +13 -1
  131. package/lib/Embed/AudioEmbed.js +9 -3
  132. package/lib/Embed/BrightcoveEmbed.js +13 -4
  133. package/lib/Embed/ConceptEmbed.js +9 -3
  134. package/lib/Embed/ConceptListEmbed.js +7 -1
  135. package/lib/Embed/ExternalEmbed.js +7 -1
  136. package/lib/Embed/H5pEmbed.js +7 -1
  137. package/lib/Embed/ImageEmbed.js +9 -3
  138. package/lib/Embed/conceptComponents.js +11 -2
  139. package/lib/FactBox/FactBox.js +10 -1
  140. package/lib/FactBox/FactBoxV2.js +12 -4
  141. package/lib/Figure/Figure.js +11 -1
  142. package/lib/Figure/FigureLicense.js +11 -1
  143. package/lib/Figure/FigureLicenseDialog.js +11 -1
  144. package/lib/Figure/FigureLicenseDialogContent.js +10 -1
  145. package/lib/FileList/FileListV2.js +7 -1
  146. package/lib/Filter/FilterButtons.js +9 -3
  147. package/lib/Filter/FilterCarousel.js +12 -4
  148. package/lib/Filter/FilterList.js +12 -4
  149. package/lib/Filter/FilterListPhone.js +12 -4
  150. package/lib/Filter/ToggleItem.js +10 -1
  151. package/lib/Footer/Footer.js +7 -1
  152. package/lib/Footer/FooterAuth.js +11 -2
  153. package/lib/Frontpage/FrontpageAllSubjects.js +1 -1
  154. package/lib/Frontpage/FrontpageProgramMenu.js +2 -2
  155. package/lib/Frontpage/illustrations/FrontpageSubjectIllustration.js +7 -1
  156. package/lib/Hero/Hero.js +10 -2
  157. package/lib/Image/Image.js +11 -2
  158. package/lib/Image/ImageLink.js +11 -2
  159. package/lib/Image/LazyLoadImage.js +11 -1
  160. package/lib/InfoBlock/InfoBlock.js +7 -1
  161. package/lib/KeyPerformanceIndicator/KeyPerformanceIndicator.d.ts +8 -0
  162. package/lib/KeyPerformanceIndicator/KeyPerformanceIndicator.js +62 -0
  163. package/lib/KeyPerformanceIndicator/index.d.ts +1 -0
  164. package/lib/KeyPerformanceIndicator/index.js +13 -0
  165. package/lib/LanguageSelector/LanguageSelector.js +7 -1
  166. package/lib/Layout/PageContainer.js +10 -1
  167. package/lib/LearningPaths/LearningPathLastStepNavigation.js +7 -1
  168. package/lib/LearningPaths/LearningPathMenu.js +9 -3
  169. package/lib/LearningPaths/LearningPathMenuIntro.js +7 -1
  170. package/lib/Logo/Logo.js +10 -1
  171. package/lib/Logo/SvgLogo.js +10 -1
  172. package/lib/Masthead/Masthead.js +7 -1
  173. package/lib/Masthead/MastheadAuthModal.js +11 -1
  174. package/lib/Masthead/utils.js +9 -3
  175. package/lib/MediaList/MediaList.js +10 -1
  176. package/lib/Messages/MessageBanner.js +7 -1
  177. package/lib/Messages/MessageBox.js +7 -1
  178. package/lib/Messages/MessageBoxTag.js +7 -1
  179. package/lib/MultidisciplinarySubject/List.js +4 -1
  180. package/lib/MyNdla/Resource/Folder.js +7 -1
  181. package/lib/MyNdla/Resource/FolderInput.js +10 -1
  182. package/lib/MyNdla/SettingsMenu.js +7 -1
  183. package/lib/NDLAFilm/AllMoviesAlphabetically.js +9 -3
  184. package/lib/NDLAFilm/CategorySelect.js +9 -2
  185. package/lib/NDLAFilm/FilmMovieList.js +9 -1
  186. package/lib/NDLAFilm/FilmSlideshow.js +12 -4
  187. package/lib/NDLAFilm/VisualElement.js +7 -1
  188. package/lib/Notion/ConceptNotion.js +6 -1
  189. package/lib/Notion/FigureNotion.js +6 -1
  190. package/lib/Notion/Notion.js +7 -1
  191. package/lib/Notion/NotionVisualElement.js +6 -1
  192. package/lib/RadioButtonGroup/RadioButtonGroup.js +10 -2
  193. package/lib/RelatedArticleList/RelatedArticleList.js +4 -2
  194. package/lib/RelatedArticleList/RelatedArticleV2.js +12 -3
  195. package/lib/Resource/BlockResource.js +7 -1
  196. package/lib/Resource/ListResource.js +7 -1
  197. package/lib/Resource/resourceComponents.js +7 -1
  198. package/lib/ResourceGroup/ResourceItem.js +7 -1
  199. package/lib/ResourceGroup/ResourceList.js +11 -1
  200. package/lib/ResourcesWrapper/ResourcesWrapper.js +11 -1
  201. package/lib/Search/ContentTypeResult.js +5 -3
  202. package/lib/Search/SearchField.js +10 -1
  203. package/lib/Search/SearchResult.js +3 -1
  204. package/lib/Search/SearchResultSleeve.js +8 -2
  205. package/lib/Search/ToggleSearchButton.js +11 -1
  206. package/lib/SearchTypeResult/ActiveFilterContent.js +7 -1
  207. package/lib/SearchTypeResult/ActiveFilters.js +7 -1
  208. package/lib/SearchTypeResult/PopupFilter.js +9 -3
  209. package/lib/SearchTypeResult/SearchFieldHeader.js +9 -3
  210. package/lib/SearchTypeResult/SearchFilterContent.js +7 -1
  211. package/lib/SearchTypeResult/SearchHeader.js +9 -3
  212. package/lib/SearchTypeResult/SearchItem.js +7 -1
  213. package/lib/SearchTypeResult/SearchItemList.js +7 -1
  214. package/lib/SearchTypeResult/SearchItems.js +7 -1
  215. package/lib/SearchTypeResult/SearchNotionItem.js +7 -1
  216. package/lib/SearchTypeResult/SearchSubjectItem.js +7 -1
  217. package/lib/SearchTypeResult/SearchTypeHeader.js +7 -1
  218. package/lib/SearchTypeResult/SearchTypeResult.js +9 -1
  219. package/lib/SearchTypeResult/SearchViewType.js +7 -1
  220. package/lib/SearchTypeResult/components/ItemContexts.js +7 -1
  221. package/lib/SearchTypeResult/components/ItemResourceHeader.js +7 -1
  222. package/lib/SearchTypeResult/components/ItemTopicHeader.js +7 -1
  223. package/lib/SearchTypeResult/components/SubjectFilters.js +12 -4
  224. package/lib/SnackBar/SnackbarProvider.js +12 -4
  225. package/lib/Table/Table.js +12 -4
  226. package/lib/TagSelector/Control.js +10 -1
  227. package/lib/TagSelector/DropdownIndicator.js +10 -2
  228. package/lib/TagSelector/Input.js +10 -1
  229. package/lib/TagSelector/Menu.js +11 -1
  230. package/lib/TagSelector/MenuList.js +10 -1
  231. package/lib/TagSelector/Option.js +10 -1
  232. package/lib/TagSelector/SelectContainer.js +10 -1
  233. package/lib/TagSelector/TagSelector.js +12 -4
  234. package/lib/TagSelector/ValueButton.js +10 -1
  235. package/lib/Topic/Topic.js +7 -1
  236. package/lib/Translation/Translation.js +10 -1
  237. package/lib/Translation/TranslationLine.js +10 -1
  238. package/lib/TreeStructure/AddFolderButton.js +7 -1
  239. package/lib/TreeStructure/FolderItem.js +60 -23
  240. package/lib/TreeStructure/FolderItems.js +11 -1
  241. package/lib/TreeStructure/TreeStructure.js +9 -3
  242. package/lib/TreeStructure/helperFunctions.js +4 -1
  243. package/lib/User/AuthModal.js +7 -1
  244. package/lib/User/UserInfo.js +8 -3
  245. package/lib/User/parseUserObject.js +12 -4
  246. package/lib/all.css +1 -1
  247. package/lib/index.d.ts +3 -0
  248. package/lib/index.js +21 -0
  249. package/lib/locale/messages-en.d.ts +2 -0
  250. package/lib/locale/messages-en.js +12 -1
  251. package/lib/locale/messages-nb.d.ts +2 -0
  252. package/lib/locale/messages-nb.js +12 -1
  253. package/lib/locale/messages-nn.d.ts +2 -0
  254. package/lib/locale/messages-nn.js +12 -1
  255. package/lib/locale/messages-se.d.ts +2 -0
  256. package/lib/locale/messages-se.js +89 -78
  257. package/lib/locale/messages-sma.d.ts +2 -0
  258. package/lib/locale/messages-sma.js +12 -1
  259. package/lib/model/ContentType.js +4 -1
  260. package/package.json +16 -16
  261. package/src/BlogPost/BlogPost.stories.tsx +4 -3
  262. package/src/ContactBlock/ContactBlock.tsx +144 -0
  263. package/src/ContactBlock/Contactblock.stories.tsx +88 -0
  264. package/src/ContactBlock/index.ts +10 -0
  265. package/src/KeyPerformanceIndicator/KeyPerformanceIndicator.stories.tsx +79 -0
  266. package/src/KeyPerformanceIndicator/KeyPerformanceIndicator.tsx +66 -0
  267. package/src/KeyPerformanceIndicator/index.ts +9 -0
  268. package/src/LanguageSelector/LanguageSelector.stories.tsx +4 -3
  269. package/src/LetterFilter/LetterFilter.stories.tsx +4 -3
  270. package/src/MyNdla/Resource/Folder.stories.tsx +39 -0
  271. package/src/Resource/BlockResource.stories.tsx +52 -0
  272. package/src/Resource/Resource.stories.tsx +52 -0
  273. package/src/TreeStructure/FolderItem.tsx +39 -20
  274. package/src/index.ts +3 -0
  275. package/src/locale/messages-en.ts +2 -0
  276. package/src/locale/messages-nb.ts +2 -0
  277. package/src/locale/messages-nn.ts +2 -0
  278. package/src/locale/messages-se.ts +79 -77
  279. package/src/locale/messages-sma.ts +2 -0
  280. package/src/MyNdla/Resource/Folder.stories.mdx +0 -53
  281. package/src/Resource/BlockResource.stories.mdx +0 -58
  282. package/src/Resource/Resource.stories.mdx +0 -58
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Copyright (c) 2022-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import React from 'react';
10
+ import { Meta, StoryFn } from '@storybook/react';
11
+ import { defaultParameters } from '../../../../stories/defaults';
12
+ import ListResource from './ListResource';
13
+
14
+ export default {
15
+ title: 'Enkle komponenter/Ressurser/ListResource',
16
+ component: ListResource,
17
+ tags: ['autodocs'],
18
+ parameters: {
19
+ ...defaultParameters,
20
+ },
21
+ argTypes: {
22
+ resourceImage: {
23
+ control: false,
24
+ },
25
+ resourceTypes: {
26
+ control: false,
27
+ },
28
+ headingLevel: {
29
+ control: false,
30
+ },
31
+ menuItems: {
32
+ control: false,
33
+ },
34
+ },
35
+ args: {
36
+ id: '1234',
37
+ link: '',
38
+ title: 'Tittel til ressurs',
39
+ resourceImage: {
40
+ src: '',
41
+ alt: '',
42
+ },
43
+ resourceTypes: [{ id: 'urn:resourcetype:learningPath', name: 'Læringssti' }],
44
+ tags: ['tag', 'tag', 'tag', 'tag'],
45
+ },
46
+ } as Meta<typeof ListResource>;
47
+
48
+ export const ListResourceStory: StoryFn<typeof ListResource> = (args) => {
49
+ return <ListResource {...args} />;
50
+ };
51
+
52
+ ListResourceStory.storyName = 'ListResource';
@@ -10,6 +10,7 @@ import React, { KeyboardEvent, useEffect, useRef } from 'react';
10
10
  import { useTranslation } from 'react-i18next';
11
11
  import styled from '@emotion/styled';
12
12
  import { ArrowDropDownRounded } from '@ndla/icons/common';
13
+ import { FolderOutlined, FolderShared } from '@ndla/icons/contentType';
13
14
  import { Done } from '@ndla/icons/editor';
14
15
  import { ButtonV2 as Button } from '@ndla/button';
15
16
  import { colors, spacing, animations, spacingUnit, misc, fonts } from '@ndla/core';
@@ -45,6 +46,17 @@ const StyledName = styled.span`
45
46
  text-align: left;
46
47
  `;
47
48
 
49
+ const IconWrapper = styled.div`
50
+ display: flex;
51
+ `;
52
+
53
+ const FolderIconWrapper = styled.div`
54
+ svg {
55
+ height: 24px;
56
+ width: 24px;
57
+ }
58
+ `;
59
+
48
60
  const shouldForwardProp = (name: string) => !['selected', 'level', 'focused', 'isCreatingFolder'].includes(name);
49
61
 
50
62
  interface FolderNameProps {
@@ -56,8 +68,7 @@ interface FolderNameProps {
56
68
 
57
69
  const FolderName = styled(Button, { shouldForwardProp })<FolderNameProps>`
58
70
  display: grid;
59
- grid-template-columns: ${spacing.medium} 1fr auto;
60
-
71
+ grid-template-columns: auto 1fr auto;
61
72
  padding-left: ${({ level }) => 0.75 * spacingUnit * level}px;
62
73
  gap: ${spacing.xxsmall};
63
74
  border: none;
@@ -171,6 +182,8 @@ const FolderItem = ({
171
182
  const isMaxDepth = level > maxLevel;
172
183
  const hideArrow = isMaxDepth || emptyFolder;
173
184
 
185
+ const FolderIcon = folder.status === 'shared' ? FolderShared : FolderOutlined;
186
+
174
187
  const tabable = selected || focused || (!focusedFolder && !folder.parentId && index === 0);
175
188
 
176
189
  return type === 'navigation' ? (
@@ -225,6 +238,7 @@ const FolderItem = ({
225
238
  aria-selected={selected}
226
239
  focused={focusedFolder?.id === folder.id}
227
240
  aria-describedby={containsResource ? `alreadyAdded-${folder.id}` : undefined}
241
+ aria-label={`${name}${folder.status === 'shared' ? `, ${t('myNdla.folder.sharing.shared')}` : ''}`}
228
242
  variant="ghost"
229
243
  shape="sharp"
230
244
  fontWeight="normal"
@@ -239,24 +253,29 @@ const FolderItem = ({
239
253
  onClick={handleClickFolder}
240
254
  isCreatingFolder={isCreatingFolder}
241
255
  >
242
- {!hideArrow && (
243
- <OpenButton
244
- aria-hidden
245
- tabIndex={-1}
246
- isOpen={isOpen}
247
- onClick={(e) => {
248
- e.stopPropagation();
249
- setFocusedFolder(folder);
250
- if (isOpen) {
251
- onCloseFolder(id);
252
- } else {
253
- onOpenFolder(id);
254
- }
255
- }}
256
- >
257
- <ArrowDropDownRounded />
258
- </OpenButton>
259
- )}
256
+ <IconWrapper>
257
+ {!hideArrow && (
258
+ <OpenButton
259
+ aria-hidden
260
+ tabIndex={-1}
261
+ isOpen={isOpen}
262
+ onClick={(e) => {
263
+ e.stopPropagation();
264
+ setFocusedFolder(folder);
265
+ if (isOpen) {
266
+ onCloseFolder(id);
267
+ } else {
268
+ onOpenFolder(id);
269
+ }
270
+ }}
271
+ >
272
+ <ArrowDropDownRounded />
273
+ </OpenButton>
274
+ )}
275
+ <FolderIconWrapper>
276
+ <FolderIcon />
277
+ </FolderIconWrapper>
278
+ </IconWrapper>
260
279
  <StyledName>{name}</StyledName>
261
280
  {containsResource && (
262
281
  <StyledDone
package/src/index.ts CHANGED
@@ -181,6 +181,7 @@ export { default as messagesNB } from './locale/messages-nb';
181
181
  export { default as messagesNN } from './locale/messages-nn';
182
182
  export { default as messagesEN } from './locale/messages-en';
183
183
  export { default as messagesSE } from './locale/messages-se';
184
+ export { default as messagesSMA } from './locale/messages-sma';
184
185
 
185
186
  export { default as RadioButtonGroup } from './RadioButtonGroup';
186
187
 
@@ -270,3 +271,5 @@ export type { TreeStructureProps } from './TreeStructure';
270
271
  export { SearchField, SearchResultList, SearchResultItem, ActiveFilters, ToggleSearchButton } from './Search';
271
272
  export { default as LetterFilter } from './LetterFilter';
272
273
  export { BlogPostV2 } from './BlogPost';
274
+ export { KeyPerformanceIndicator } from './KeyPerformanceIndicator';
275
+ export { default as ContactBlock } from './ContactBlock';
@@ -964,6 +964,8 @@ const messages = {
964
964
  loading: 'Loading',
965
965
  title: 'Title',
966
966
  save: 'Save',
967
+ photo: 'Photo',
968
+ email: 'Email',
967
969
  image: {
968
970
  altText: 'Alt-text',
969
971
  caption: 'Caption',
@@ -963,6 +963,8 @@ const messages = {
963
963
  title: 'Tittel',
964
964
  cancel: 'Avbryt',
965
965
  save: 'Lagre',
966
+ photo: 'Foto',
967
+ email: 'E-post',
966
968
  image: {
967
969
  altText: 'Alt-tekst',
968
970
  caption: 'Bildetekst',
@@ -963,6 +963,8 @@ const messages = {
963
963
  loading: 'Laster',
964
964
  title: 'Tittel',
965
965
  save: 'Lagre',
966
+ photo: 'Foto',
967
+ email: 'E-post',
966
968
  image: {
967
969
  altText: 'Alt-tekst',
968
970
  caption: 'Bilettekst',
@@ -256,24 +256,24 @@ const messages = {
256
256
  archived: 'Dát leat heaittihuvvon fága mii ii ođasmahttojuvvo.',
257
257
  },
258
258
  subjectsPage: {
259
- filterSubjects: 'Filtrer fag',
260
- scrollToGroup: 'Hopp til gruppe',
261
- goToTop: ' til toppen',
262
- alphabeticSort: 'Fag gruppert alfabetisk',
263
- subjectGroup: 'Gruppe "{{ category }}"',
259
+ filterSubjects: 'Filtarastte fágaid',
260
+ scrollToGroup: 'Njuike jovkui',
261
+ goToTop: 'Mana álgui',
262
+ alphabeticSort: 'Fágat alfabehtalaččat',
263
+ subjectGroup: 'Joavku "{{ category }}"',
264
264
  allSubjects: 'Buot fágat',
265
- myFavoriteSubjects: 'Mine favorittfag',
265
+ myFavoriteSubjects: 'Mu oiddotfágat',
266
266
  errorDescription: 'Šállošat, boasttuvuohta čuožžilii fágaid viežžamis.',
267
267
  chooseSubject: 'Vállje fága',
268
- confirmRemove: 'Er du sikker at du vil fjerne {{subject}} fra favorittfag?',
269
- addFavorite: 'Legg til favorittfag',
270
- removeFavorite: 'Fjern favorittfag',
271
- removeConfirmed: '{{subject}} er fjernet fra favorittfag',
272
- addConfirmed: '{{subject}} er lagt til som favorittfag',
273
- subjectFavoritePitch: 'Ønsker du å favorittmerke dette faget?',
268
+ confirmRemove: 'Leat go sihkar ahte áiggut sihkkut {{subject}} oiddotfágain?',
269
+ addFavorite: 'Lasit oiddotfága',
270
+ removeFavorite: 'Sihko oiddotfága',
271
+ removeConfirmed: '{{subject}} lea sihkkojuvvon oiddotfágain',
272
+ addConfirmed: '{{subject}} lea lasihuvvon oiddotfágan',
273
+ subjectFavoritePitch: 'Háliidat go dán fága merket oiddotfágan?',
274
274
  subjectFavoriteGuide:
275
- 'For å favorittmerke et fag du logge inn Min NDLA. Du finner faget øverst denne siden etter at du har logget inn.',
276
- shows: 'Viser',
275
+ 'Vai galggat sáhttit merket fága oiddohin, fertet logget sisa Mu NDLAii. Fága gávnnat bajimusas siiddus go leat sisaloggen.',
276
+ shows: 'Čájeha',
277
277
  },
278
278
  topicPage: {
279
279
  articleErrorDescription: 'Šállošat, boasttuvuohta čuožžilii fáddáčilgehusa viežžamis.',
@@ -337,33 +337,33 @@ const messages = {
337
337
  toolboxTeachers: 'Reaidokássa - oahpaheddjiide',
338
338
  film: 'NDLA Filbma',
339
339
  about: {
340
- title: 'Om NDLA',
341
- numbers: 'Tall og rapporter',
342
- keyPersonnel: 'Nøkkelpersoner',
343
- vacancies: 'Utlysninger',
344
- vision: 'Visjon og verdier',
345
- communityPurpose: 'Vårt samfunnsoppdrag',
346
- history: 'NDLAs historie',
347
- cooperation: 'Våre samarbeid',
348
- faq: 'Ofte stilte spørsmål',
349
- follow: 'Følg våre sosiale medier',
350
- whoAreWe: 'Hvem er vi?',
351
- whatWeDo: 'Hva gjør vi?',
352
- careers: 'Jobb hos oss',
353
- contactUs: 'Kontakt oss',
354
- organizing: 'Organisering',
355
- articlesOfAssociation: 'Vedtekter',
340
+ title: 'NDLA birra',
341
+ numbers: 'Logut ja raporttat',
342
+ keyPersonnel: 'Čoavddaolbmot',
343
+ vacancies: 'Almmuhusat',
344
+ vision: 'Niehkodoaivva ja árvvut',
345
+ communityPurpose: 'Min servvodatdoaibma',
346
+ history: 'NDLA historjá',
347
+ cooperation: 'Min ovttasbarggu',
348
+ faq: 'Dávjá jerron jearaladagat',
349
+ follow: 'Čuovo min sosiála medijaid',
350
+ whoAreWe: 'Geat leat mii?',
351
+ whatWeDo: 'Maid mii bargat?',
352
+ careers: 'Barggut min fitnodagas',
353
+ contactUs: 'Váldde oktavuođa minguin',
354
+ organizing: 'Organiseren',
355
+ articlesOfAssociation: 'Njuolggadusat',
356
356
  },
357
357
  },
358
358
  menu: {
359
- button: 'Meny',
360
- goToMainMenu: ' til hovedmeny',
359
+ button: 'Fállu',
360
+ goToMainMenu: 'Mana váldofállui',
361
361
  close: 'Govčča',
362
362
  goTo: 'Mana deike',
363
363
  search: 'Oza',
364
364
  toFrontpage: 'Ovdasiidui',
365
365
  subjectOverview: 'Buot fágat',
366
- title: 'Åpne meny',
366
+ title: 'Raba fálu',
367
367
  modalLabel: 'Vállje sisdoalu',
368
368
  subjectPage: 'Ovdasiidu fágas',
369
369
  backToSubjectFrontpage: 'Ruovttoluotta fága ovdasiidui',
@@ -501,9 +501,9 @@ const messages = {
501
501
  competenceGoalClose: 'Govčča',
502
502
  competenceGoalTitle: 'Mihttun lea ahte oahppi galgá máhttit:',
503
503
  competenceTabLK20label: 'Gealbomihttomearri',
504
- competenceTabLK20Tooltip: 'Vis kompetansemål',
504
+ competenceTabLK20Tooltip: 'Čájet gealbomihtuid',
505
505
  competenceTabCorelabel: 'Guovddášelemeanta',
506
- competenceTabCoreTooltip: 'Vis kjerneelementer',
506
+ competenceTabCoreTooltip: 'Čájet guovddášelemeanttaid',
507
507
  competenceGoalItem: {
508
508
  title: 'Gealbomihttomearit ja árvvoštallan',
509
509
  },
@@ -642,21 +642,21 @@ const messages = {
642
642
  },
643
643
  figure: {
644
644
  button: {
645
- alternative: 'Lonut mas dulkojuvvo oaidninváttuid ektui',
645
+ alternative: 'Lonut siidui mas dulkojuvvo oaidninváttuid ektui',
646
646
  original: 'Lonut orginála videoi',
647
647
  },
648
648
  },
649
649
  footer: {
650
650
  aboutNDLA: 'NDLA birra',
651
- socialMedia: 'Sosiale medier',
651
+ socialMedia: 'Sosiála mediat',
652
652
  selectLanguage: 'Vállje giela (language): ',
653
653
  vision: 'Ovttas hábmet boahtteáiggi oahppama',
654
654
  linksHeader: 'Eará NDLA neahttabáikkit',
655
655
  info: 'Neahttabáiki lea ráhkaduvvon NDLA bokte rabas gáldokodain.',
656
656
  editorInChief: 'Vásttolaš doaimmaheaddji:',
657
- availabilityLink: 'Tilgjengelighetserklæring',
657
+ availabilityLink: 'Beasatlašvuođajulggaštus',
658
658
  privacyLink: 'Persovdnasuodjalusjulggaštus ja diehtočoahkku (gáhkožat)',
659
- cookiesLink: 'Julggaštus birra diehtočoahkku (gáhkožat)',
659
+ cookiesLink: 'Julggaštus diehtočoahku ektui (gáhkožat)',
660
660
  socialMediaLinks: {
661
661
  facebook: 'NDLA Facebookas',
662
662
  facebookAria: 'Fina NDLA siiddus Facebookas',
@@ -674,7 +674,7 @@ const messages = {
674
674
  ndlaLinks: {
675
675
  ndla: 'ndla.no',
676
676
  omNdla: 'NDLA birra',
677
- aboutNdla: 'About NDLA',
677
+ aboutNdla: 'NDLA birra',
678
678
  blog: 'Fágablogga',
679
679
  tips: 'Cavgileapmi ohppiide',
680
680
  fyr: 'FYR-prošeakta',
@@ -766,7 +766,7 @@ const messages = {
766
766
  hits: '{{count}} deaivama',
767
767
  },
768
768
  notions: {
769
- tags: 'Liste og filter',
769
+ tags: 'Listu ja filttar',
770
770
  usedIn: 'Adnojuvvo dás',
771
771
  closeNotion: 'Govčča',
772
772
  },
@@ -835,7 +835,7 @@ const messages = {
835
835
  shortFilm: 'Oanehis filbma',
836
836
  all: 'Buot filmmat A-Å',
837
837
  },
838
- allMovieGroupTitleLabel: 'Filmar som startar {{letter}}',
838
+ allMovieGroupTitleLabel: 'Filmmat mat álget {{letter}}',
839
839
  moreAboutNdlaFilm: {
840
840
  header: 'NDLA Filbma',
841
841
  firstParagraph:
@@ -933,7 +933,7 @@ const messages = {
933
933
  frontpageMultidisciplinarySubject: {
934
934
  heading: 'Fágaidrasttideaddji fáttát',
935
935
  text: 'Oahppoplána golbma fágaidrasttideaddji fáttáin leat vuolggasadjin áigeguovdilis hástalusat servvodagas mat gáibidit beroštumi ja rahčamuša ovttaskas olbmuin ja searvevuođas lagasbirrasis, našunálalaččat ja máilmmeviidosaččat.',
936
- linkText: 'Geahča casaid fágaidrasttideaddji fáttáin.',
936
+ linkText: 'Geahča keisaid fágaidrasttideaddji fáttáin.',
937
937
  publicHealthTopic: 'Álbmotdearvvašvuohta ja eallimis birgen',
938
938
  democracyTopic: 'Demokratiija ja mielboargárvuohta',
939
939
  sustainableTopic: 'Guoddevaš ovdáneapmi',
@@ -953,7 +953,7 @@ const messages = {
953
953
  loadingText: 'Viežžá fáttá',
954
954
  },
955
955
  multidisciplinarySubject: {
956
- subjectsLinksDescription: 'Case mii gullá',
956
+ subjectsLinksDescription: 'Keisa mii gullá',
957
957
  },
958
958
  multibutton: {
959
959
  open: 'Raba fálu',
@@ -964,6 +964,8 @@ const messages = {
964
964
  title: 'Tihttel',
965
965
  cancel: 'Botkke',
966
966
  save: 'Vurke',
967
+ photo: 'Foto',
968
+ email: 'E-post',
967
969
  image: {
968
970
  altText: 'Molssaevttolaš teaksta',
969
971
  caption: 'Govvateaksta',
@@ -1075,7 +1077,7 @@ const messages = {
1075
1077
  mail: 'Eboasta',
1076
1078
  username: 'Geavahan namma',
1077
1079
  mobile: 'Telefonnummar',
1078
- preferredLanguage: 'Háliiduvvon giella',
1080
+ preferredLanguage: 'Sávvojuvvon giella',
1079
1081
  groupTypes: {
1080
1082
  basic: 'Vuođđojoavku',
1081
1083
  teaching: 'Oahpahusjoavku',
@@ -1100,8 +1102,8 @@ const messages = {
1100
1102
  resources: '{{count}} resursa',
1101
1103
  resources_plural: '{{count}} resurssat',
1102
1104
  folders: '{{count}} máhpat',
1103
- folders_plural: '{{count}} mapper',
1104
- settings: 'Instillinger',
1105
+ folders_plural: '{{count}} máhpat',
1106
+ settings: 'Válljemat',
1105
1107
  folder: {
1106
1108
  folder: 'Máhppa',
1107
1109
  delete: 'Sihko máhpa',
@@ -1117,30 +1119,30 @@ const messages = {
1117
1119
  onDragCancel: 'Sirdin botkejuvvui. Máhppa {{name}} lea luitojuvvon.',
1118
1120
  dragHandle: 'Ordne máhpa {{name}}',
1119
1121
  sharing: {
1120
- share: 'Del mappe',
1121
- shared: 'Delt',
1122
- unShare: 'Delingen er avsluttet. Mappen er ikke lenger delt.',
1123
- link: 'Lenken er kopiert',
1122
+ share: 'Juoge máhpa',
1123
+ shared: 'Juogaduvvon',
1124
+ unShare: 'Juohkin lea loahpahuvvon. Máhppa ii leat šat juogaduvvon.',
1125
+ link: 'Liŋka lea máŋgejuvvon.',
1124
1126
  header: {
1125
- private: 'Vil du dele denne mappen?',
1126
- shared: 'Denne mappen er delt.',
1127
- unShare: 'Vil du avslutte deling av denne mappen?',
1127
+ private: 'Áiggut go juogadit dán máhpa?',
1128
+ shared: 'Dát máhpa lea juogaduvvon.',
1129
+ unShare: 'Háliidat go loahpahit máhpa juogadeami?',
1128
1130
  },
1129
1131
  description: {
1130
- copy: 'Kopier og del denne lenken:',
1132
+ copy: 'Máŋge ja juoge dán liŋkka:',
1131
1133
  private:
1132
- 'Når du deler en mappe lager du en lenke som er åpen for alle som har lenken. Du kan endre innholdet eller avslutte delingen når du ønsker.',
1133
- private2: 'Når du deler en mappe deler du alt innholdet i mappen, inkludert undermapper og ressurser',
1134
+ 'Go juogát máhpa ráhkadat liŋkka mii lea rabas buohkaide geas lea liŋka. Sáhtát rievdadit sisdoalu dahje loahpahit juogadeami go háliidat.',
1135
+ private2: 'Go juogadat máhpa juogát buot máhpa sisdoalu, oktan vuollemáhpaiguin ja resursaiguin',
1134
1136
  shared:
1135
- ' kan du dele denne lenken med elever eller andre lærere. Hvis du gjør endringer i mappen vil de bli synlige for alle du har delt lenken med.',
1137
+ 'Dál sáhtát juogadit dán liŋkka ohppiiguin dahje eará oahpaheddjiiguin. Jus rievdadat maidege máhpas šaddá rievdan oinnolaš buohkaide geaidda leat juogadan liŋkka',
1136
1138
  unShare:
1137
- 'Når du avsluttar deling, sluttar lenka til den delte mappa og eventuelle undermapper å verke. Dersom du har delt lenka med nokon, kan dei ikkje lenger sjå innhaldet i mappa. Dette gjelder òg lenker til eventuelle undermapper.',
1139
+ 'Go loahpahat juogadeami ii doaimma liŋka juogaduvvon máhppii šat. Jus leat juogadan liŋkka ovttainge, de eai sáhte šat oaidnit máhpa sisdoalu',
1138
1140
  },
1139
1141
  button: {
1140
- share: 'Del mappen',
1141
- preview: 'Forhåndsvis mappe',
1142
- unShare: 'Avslutt deling',
1143
- shareLink: 'Kopier lenke',
1142
+ share: 'Juoge máhpa',
1143
+ preview: 'Čájet ovdagihtii juogaduvvon máhpa',
1144
+ unShare: 'Loahpat juogdeami',
1145
+ shareLink: 'Máŋge liŋkka',
1144
1146
  },
1145
1147
  },
1146
1148
  },
@@ -1171,18 +1173,18 @@ const messages = {
1171
1173
  detailView: 'Bienalaš oppalašlistu',
1172
1174
  shortView: 'Oanehis listu',
1173
1175
  sharedFolder: {
1174
- info: 'Denne mappa inneheld fagstoff og oppgåver frå NDLA, samla av ein lærar.',
1175
- firstShared: 'Mappa vart delt første gong {{date}}',
1176
- drawerButton: 'Vis mapper og ressursar',
1177
- drawerTitle: 'Mapper og ressursar',
1176
+ info: 'Dán máhpas lea NDLA fágasisdoallu ja bargobihtát, čohkkejuvvon oahpaheaddjis.',
1177
+ firstShared: 'Máhppa juogaduvvui vuosttaš geardde {{date}}',
1178
+ drawerButton: 'Čájet máhpaid ja resurssaid',
1179
+ drawerTitle: 'Máhpat ja resurssat',
1178
1180
  learningpathUnsupported:
1179
- 'Læringsstiar kan ikke visast direkte i delte mapper. Dersom du trykker lenka i navigasjonsmenyen til venstre, blir stien opna i ei ny fane.',
1181
+ 'Oahppanbálgát eai sáhte njuolga čájehuvvot juogaduvvon máhpain. Jus deaddilat liŋkka navigerenfálus gurut bealde, rahpasa bálggis ođđa siiddus.',
1180
1182
  description: {
1181
1183
  info1:
1182
- 'I denne delte mappa finn du fagstoff og oppgåver frå NDLA. Artiklane er samla inn og sette i rekkefølge av ein lærar.',
1183
- info2: 'Du kan bla i artiklane ved å bruke menyen.',
1184
+ 'Dán máhpas gávnnat fágaávdnasiid ja bargobihtáid NDLAs. Oahpaheaddji lea čohkken artihkkaliid ja bidjan daid ortnetvurrui.',
1185
+ info2: 'Sáhtát bláđet artihkkaliid fálu vehkiin.',
1184
1186
  info3:
1185
- 'Dersom du vil finne igjen mappa seinare, kan du bruke lenka du fekk av læraren din, eller du kan bokmerke sida.',
1187
+ 'Jus háliidat gávdnat máhpa maŋŋel fas, sáhtát geavahit seamma liŋkka maid oahpaheaddjis leat ožžon, dahje sáhtát girjemearka bidjat siidui.',
1186
1188
  },
1187
1189
  willOpenInNewTab: 'Åpnes i ny fane.',
1188
1190
  },
@@ -1206,7 +1208,7 @@ const messages = {
1206
1208
  read: { read: 'Loga min', our: '.' },
1207
1209
  privacy: 'personsuodjalusjulggaštusa',
1208
1210
  privacyLink: 'https://om.ndla.no/gdpr',
1209
- questions: { question: 'Smiehtat go maidege?', ask: 'Jeara min chattas' },
1211
+ questions: { question: 'Smiehtat go maidege?', ask: 'Jeara min čeattas' },
1210
1212
  wishToDelete: 'It go hálit geavaheaddjiprofiila min geahčen šat?',
1211
1213
  terms: {
1212
1214
  terms: 'Eavttut geavaheapmái',
@@ -1254,7 +1256,7 @@ const messages = {
1254
1256
  tagsUpdated: 'Fáddágilkorat leat ođastuvvon',
1255
1257
  show: 'Čájet',
1256
1258
  save: 'Vurke resurssa',
1257
- onDragStart: 'Dohppe resurssa {{name}}. Resursa lea {{index}} posišuvnnas čuovvovačča {{length}} posišuvnnas',
1259
+ onDragStart: 'Rohtte resurssa {{name}}. Resursa lea {{index}} posišuvnnas čuovvovačča {{length}} posišuvnnas',
1258
1260
  onDragOver: 'Resursa {{name}} sirdojuvvui {{index}} posišuvdnii {{length}} posišuvnnas',
1259
1261
  onDragOverMissingOver: 'Resursa {{name}} ii leat šat luoitinposišuvnnas',
1260
1262
  onDragEnd: 'Resursa {{name}} luitojuvvui {{index}} posišuvdnii {{length}} posišuvnnas',
@@ -1290,12 +1292,12 @@ const messages = {
1290
1292
  help: 'Veahket',
1291
1293
  },
1292
1294
  programme: {
1293
- grades: 'Trinn',
1295
+ grades: 'Ceahkki',
1294
1296
  },
1295
1297
  embed: {
1296
- conceptListError: 'Klarte ikkje å vise forklaringsliste',
1297
- linkError: 'Klarte ikkje å vise lenke.',
1298
- unsupported: `Embed {{type}} er ikkje støtta.`,
1298
+ conceptListError: 'Ii sáhttán čájehit čilgehuslisttu',
1299
+ linkError: 'Ii sáhttán čájehit liŋkka.',
1300
+ unsupported: `Embed {{type}} ii dorjojuvvo.`,
1299
1301
  },
1300
1302
  };
1301
1303
 
@@ -967,6 +967,8 @@ const messages = {
967
967
  title: 'Tihtele',
968
968
  cancel: 'Orrejh',
969
969
  save: 'Vöörhkh',
970
+ photo: 'Foto',
971
+ email: 'E-post',
970
972
  image: {
971
973
  altText: 'Alt-tekst',
972
974
  caption: 'Bildetekst',
@@ -1,53 +0,0 @@
1
- import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
2
- import { defaultParameters } from '../../../../../stories/defaults';
3
- import { Pencil } from '@ndla/icons/action';
4
- import { DeleteForever } from '@ndla/icons/editor';
5
-
6
- import Folder from './Folder';
7
- import ButtonV2 from '../../../../button/src/ButtonV2';
8
-
9
- <Meta
10
- title="Enkle komponenter/Mappe"
11
- component={Folder}
12
- parameters={{
13
- ...defaultParameters,
14
- docs: {
15
- inlineStories: true,
16
- },
17
- backgrounds: {},
18
- }}
19
- argTypes={{
20
- menuItems: {
21
- control: false,
22
- },
23
- }}
24
- />
25
-
26
- export const Template = (args) => <Folder {...args} />;
27
-
28
- # Mappe
29
-
30
- <Canvas>
31
- <Story
32
- name="Mappe"
33
- args={{
34
- id: '3d88300c-1186-47f5-a99a-8ea93fa20981',
35
- title: 'Dette er min tittel',
36
- subFolders: 3,
37
- subResources: 3,
38
- description: '',
39
- link: '',
40
- type: 'list',
41
- menuItems: [
42
- { icon: <Pencil />, text: 'Rediger', onClick: () => {} },
43
- { icon: <DeleteForever />, text: 'Slett', onClick: () => {}, type: 'danger' },
44
- ],
45
- isShared: 'true',
46
- }}>
47
- {Template.bind({})}
48
- </Story>
49
- </Canvas>
50
-
51
- ### Props
52
-
53
- <ArgsTable story="Mappe" />
@@ -1,58 +0,0 @@
1
- import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
2
- import { defaultParameters } from '../../../../stories/defaults';
3
- import { Pencil } from '@ndla/icons/action';
4
- import { DeleteForever } from '@ndla/icons/editor';
5
-
6
- import BlockResource from './BlockResource';
7
-
8
- <Meta
9
- title="Enkle komponenter/Ressurser/BlockResource"
10
- component={BlockResource}
11
- parameters={{
12
- ...defaultParameters,
13
- docs: {
14
- inlineStories: true,
15
- },
16
- backgrounds: {},
17
- }}
18
- argTypes={{
19
- resourceImage: {
20
- control: false,
21
- },
22
- resourceTypes: {
23
- control: false,
24
- },
25
- headingLevel: {
26
- control: false,
27
- },
28
- menuItems: {
29
- control: false,
30
- },
31
- }}
32
- />
33
-
34
- export const Template = (args) => <BlockResource {...args} />;
35
-
36
- # Blokkressurs
37
-
38
- <Canvas>
39
- <Story
40
- name="BlockResource"
41
- args={{
42
- id: '1234',
43
- link: '',
44
- title: 'Tittel til ressurs',
45
- resourceImage: {
46
- src: '',
47
- alt: '',
48
- },
49
- resourceTypes: [{ id: 'urn:resourcetype:learningPath', name: 'Læringssti' }],
50
- tags: ['tag', 'tag', 'tag', 'tag'],
51
- }}>
52
- {Template.bind({})}
53
- </Story>
54
- </Canvas>
55
-
56
- ### Props
57
-
58
- <ArgsTable story="BlockResource" />