@ndla/ui 35.0.18 → 35.0.20
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.
- package/es/BlogPost/BlogPost.js +54 -0
- package/es/BlogPost/index.js +9 -0
- package/es/MyNdla/SettingsMenu.js +14 -14
- package/es/TreeStructure/ComboboxButton.js +3 -3
- package/es/TreeStructure/TreeStructure.js +7 -7
- package/es/index.js +2 -1
- package/lib/BlogPost/BlogPost.d.ts +24 -0
- package/lib/BlogPost/BlogPost.js +61 -0
- package/lib/BlogPost/index.d.ts +8 -0
- package/lib/BlogPost/index.js +13 -0
- package/lib/MyNdla/SettingsMenu.js +14 -14
- package/lib/TreeStructure/ComboboxButton.js +3 -3
- package/lib/TreeStructure/TreeStructure.d.ts +1 -1
- package/lib/TreeStructure/TreeStructure.js +7 -7
- package/lib/index.d.ts +1 -0
- package/lib/index.js +7 -0
- package/package.json +12 -12
- package/src/BlogPost/BlogPost.stories.tsx +37 -0
- package/src/BlogPost/BlogPost.tsx +102 -0
- package/src/BlogPost/index.ts +9 -0
- package/src/MyNdla/SettingsMenu.tsx +6 -7
- package/src/TreeStructure/ComboboxButton.tsx +1 -1
- package/src/TreeStructure/TreeStructure.tsx +1 -1
- package/src/index.ts +1 -0
|
@@ -29,8 +29,7 @@ const StyledDrawer = styled(Drawer)`
|
|
|
29
29
|
}
|
|
30
30
|
`;
|
|
31
31
|
|
|
32
|
-
const
|
|
33
|
-
margin: 0;
|
|
32
|
+
const StyledUl = styled.ul`
|
|
34
33
|
padding: 0;
|
|
35
34
|
list-style: none;
|
|
36
35
|
`;
|
|
@@ -39,7 +38,7 @@ const StyledModalBody = styled(ModalBody)`
|
|
|
39
38
|
padding: 0 0 ${spacing.large} 0px;
|
|
40
39
|
`;
|
|
41
40
|
|
|
42
|
-
const
|
|
41
|
+
const StyledLi = styled.li`
|
|
43
42
|
border-bottom: 1px solid ${colors.brand.neutral7};
|
|
44
43
|
`;
|
|
45
44
|
|
|
@@ -66,9 +65,9 @@ const SettingsMenu = ({ menuItems, children }: Props) => {
|
|
|
66
65
|
<StyledModalBody>
|
|
67
66
|
{children?.(close)}
|
|
68
67
|
{!!menuItems?.length && (
|
|
69
|
-
<
|
|
68
|
+
<StyledUl>
|
|
70
69
|
{menuItems.map((item, i) => (
|
|
71
|
-
<
|
|
70
|
+
<StyledLi key={i}>
|
|
72
71
|
<ButtonV2
|
|
73
72
|
fontWeight="normal"
|
|
74
73
|
variant="ghost"
|
|
@@ -81,9 +80,9 @@ const SettingsMenu = ({ menuItems, children }: Props) => {
|
|
|
81
80
|
{item.icon}
|
|
82
81
|
{item.text}
|
|
83
82
|
</ButtonV2>
|
|
84
|
-
</
|
|
83
|
+
</StyledLi>
|
|
85
84
|
))}
|
|
86
|
-
</
|
|
85
|
+
</StyledUl>
|
|
87
86
|
)}
|
|
88
87
|
</StyledModalBody>
|
|
89
88
|
</>
|
|
@@ -11,7 +11,7 @@ import styled from '@emotion/styled';
|
|
|
11
11
|
import { colors, fonts, misc, utils } from '@ndla/core';
|
|
12
12
|
import { css } from '@emotion/react';
|
|
13
13
|
import uniq from 'lodash/uniq';
|
|
14
|
-
import { IFolder } from '@ndla/types-learningpath-api';
|
|
14
|
+
import { IFolder } from '@ndla/types-backend/learningpath-api';
|
|
15
15
|
import FolderItems from './FolderItems';
|
|
16
16
|
import { flattenFolders, treestructureId } from './helperFunctions';
|
|
17
17
|
import { CommonTreeStructureProps, NewFolderInputFunc, TreeStructureType } from './types';
|
package/src/index.ts
CHANGED
|
@@ -269,3 +269,4 @@ export type { TreeStructureProps } from './TreeStructure';
|
|
|
269
269
|
|
|
270
270
|
export { SearchField, SearchResultList, SearchResultItem, ActiveFilters, ToggleSearchButton } from './Search';
|
|
271
271
|
export { default as LetterFilter } from './LetterFilter';
|
|
272
|
+
export { BlogPostV2 } from './BlogPost';
|