@ndla/ui 3.2.6 → 3.2.7
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/Figure/FigureBylineExpandButton.js +1 -2
- package/lib/Figure/Figure.d.ts +2 -1
- package/lib/Figure/FigureBylineExpandButton.d.ts +1 -2
- package/lib/Figure/FigureBylineExpandButton.js +1 -2
- package/lib/Figure/index.d.ts +1 -0
- package/package.json +2 -2
- package/src/Figure/Figure.tsx +11 -1
- package/src/Figure/FigureBylineExpandButton.tsx +1 -2
- package/src/Figure/index.ts +2 -0
|
@@ -9,8 +9,7 @@ import React from 'react';
|
|
|
9
9
|
import { ChevronUp, ChevronDown } from '@ndla/icons/common';
|
|
10
10
|
import { jsx as ___EmotionJSX } from "@emotion/core";
|
|
11
11
|
export var FigureBylineExpandButton = function FigureBylineExpandButton(_ref) {
|
|
12
|
-
var
|
|
13
|
-
messages = _ref.messages,
|
|
12
|
+
var messages = _ref.messages,
|
|
14
13
|
typeClass = _ref.typeClass;
|
|
15
14
|
return ___EmotionJSX("button", {
|
|
16
15
|
className: "c-figure__show-byline-btn",
|
package/lib/Figure/Figure.d.ts
CHANGED
|
@@ -37,12 +37,13 @@ interface FigureCaptionProps {
|
|
|
37
37
|
hasLinkedVideo?: boolean;
|
|
38
38
|
}
|
|
39
39
|
declare const Figure: ({ children, type, resizeIframe, ...rest }: Props) => JSX.Element;
|
|
40
|
+
export declare type FigureType = 'full' | 'full-column' | 'left' | 'small-left' | 'right' | 'small-right' | 'xsmall-right' | 'xsmall-left';
|
|
40
41
|
interface Props {
|
|
41
42
|
id?: string;
|
|
42
43
|
children: ReactNode | ((params: {
|
|
43
44
|
typeClass: string;
|
|
44
45
|
}) => ReactNode);
|
|
45
|
-
type?:
|
|
46
|
+
type?: FigureType;
|
|
46
47
|
resizeIframe?: boolean;
|
|
47
48
|
noFigcaption?: boolean;
|
|
48
49
|
}
|
|
@@ -6,12 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
interface Props {
|
|
9
|
-
children: Element;
|
|
10
9
|
messages: {
|
|
11
10
|
expandBylineButtonLabel: string;
|
|
12
11
|
minimizeBylineButtonLabel: string;
|
|
13
12
|
};
|
|
14
13
|
typeClass: string;
|
|
15
14
|
}
|
|
16
|
-
export declare const FigureBylineExpandButton: ({
|
|
15
|
+
export declare const FigureBylineExpandButton: ({ messages, typeClass }: Props) => JSX.Element;
|
|
17
16
|
export {};
|
|
@@ -21,8 +21,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
23
|
var FigureBylineExpandButton = function FigureBylineExpandButton(_ref) {
|
|
24
|
-
var
|
|
25
|
-
messages = _ref.messages,
|
|
24
|
+
var messages = _ref.messages,
|
|
26
25
|
typeClass = _ref.typeClass;
|
|
27
26
|
return (0, _core.jsx)("button", {
|
|
28
27
|
className: "c-figure__show-byline-btn",
|
package/lib/Figure/index.d.ts
CHANGED
|
@@ -10,3 +10,4 @@ export { Figure, FigureCaption };
|
|
|
10
10
|
export { FigureLicenseDialog } from './FigureLicenseDialog';
|
|
11
11
|
export { FigureExpandButton } from './FigureExpandButton';
|
|
12
12
|
export { FigureBylineExpandButton } from './FigureBylineExpandButton';
|
|
13
|
+
export type { FigureType } from './Figure';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"access": "public"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "f06b1ac4310c75ac713fc3ef149a31c9748f4017"
|
|
96
96
|
}
|
package/src/Figure/Figure.tsx
CHANGED
|
@@ -132,10 +132,20 @@ const isFunction = (children: Function | ReactNode): children is Function => {
|
|
|
132
132
|
return isFunctionHelper(children);
|
|
133
133
|
};
|
|
134
134
|
|
|
135
|
+
export type FigureType =
|
|
136
|
+
| 'full'
|
|
137
|
+
| 'full-column'
|
|
138
|
+
| 'left'
|
|
139
|
+
| 'small-left'
|
|
140
|
+
| 'right'
|
|
141
|
+
| 'small-right'
|
|
142
|
+
| 'xsmall-right'
|
|
143
|
+
| 'xsmall-left';
|
|
144
|
+
|
|
135
145
|
interface Props {
|
|
136
146
|
id?: string;
|
|
137
147
|
children: ReactNode | ((params: { typeClass: string }) => ReactNode);
|
|
138
|
-
type?:
|
|
148
|
+
type?: FigureType;
|
|
139
149
|
resizeIframe?: boolean;
|
|
140
150
|
noFigcaption?: boolean;
|
|
141
151
|
}
|
|
@@ -10,7 +10,6 @@ import React from 'react';
|
|
|
10
10
|
import { ChevronUp, ChevronDown } from '@ndla/icons/common';
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
13
|
-
children: Element;
|
|
14
13
|
messages: {
|
|
15
14
|
expandBylineButtonLabel: string;
|
|
16
15
|
minimizeBylineButtonLabel: string;
|
|
@@ -18,7 +17,7 @@ interface Props {
|
|
|
18
17
|
typeClass: string;
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
export const FigureBylineExpandButton = ({
|
|
20
|
+
export const FigureBylineExpandButton = ({ messages, typeClass }: Props) => {
|
|
22
21
|
return (
|
|
23
22
|
<button
|
|
24
23
|
className="c-figure__show-byline-btn"
|
package/src/Figure/index.ts
CHANGED
|
@@ -11,3 +11,5 @@ export { Figure, FigureCaption };
|
|
|
11
11
|
export { FigureLicenseDialog } from './FigureLicenseDialog';
|
|
12
12
|
export { FigureExpandButton } from './FigureExpandButton';
|
|
13
13
|
export { FigureBylineExpandButton } from './FigureBylineExpandButton';
|
|
14
|
+
|
|
15
|
+
export type { FigureType } from './Figure';
|