@conduction/components 1.0.3 → 1.0.5

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 (32) hide show
  1. package/.github/workflows/npm-publish.yml +39 -0
  2. package/lib/components/card/RichContentCard/RichContentCard.js +2 -4
  3. package/lib/components/card/RichContentCard/RichContentCard.module.css +0 -11
  4. package/lib/components/card/detailsCard/DetailsCard.d.ts +14 -0
  5. package/lib/components/card/detailsCard/DetailsCard.js +10 -0
  6. package/lib/components/card/detailsCard/DetailsCard.module.css +48 -0
  7. package/lib/components/card/index.d.ts +4 -3
  8. package/lib/components/card/index.js +4 -3
  9. package/lib/components/formFields/checkbox.d.ts +5 -1
  10. package/lib/components/formFields/input.d.ts +6 -1
  11. package/lib/components/formFields/textarea.d.ts +6 -1
  12. package/lib/components/formFields/types.d.ts +0 -14
  13. package/lib/components/pagination/Pagination.d.ts +2 -0
  14. package/lib/components/pagination/Pagination.js +6 -0
  15. package/lib/components/tag/Tag.d.ts +6 -0
  16. package/lib/components/tag/Tag.js +3 -0
  17. package/lib/components/tag/Tag.module.css +9 -0
  18. package/lib/index.d.ts +2 -2
  19. package/lib/index.js +2 -2
  20. package/package.json +7 -2
  21. package/src/components/card/detailsCard/DetailsCard.module.css +48 -0
  22. package/src/components/card/detailsCard/DetailsCard.tsx +56 -0
  23. package/src/components/card/{HorizontalImageCard → horizontalImageCard}/HorizontalImageCard.js +0 -0
  24. package/src/components/card/{HorizontalImageCard → horizontalImageCard}/HorizontalImageCard.module.css +0 -0
  25. package/src/components/card/{HorizontalImageCard → horizontalImageCard}/HorizontalImageCard.tsx +0 -0
  26. package/src/components/card/index.tsx +4 -3
  27. package/src/components/card/{RichContentCard → richContentCard}/RichContentCard.js +0 -0
  28. package/src/components/card/{RichContentCard → richContentCard}/RichContentCard.module.css +0 -11
  29. package/src/components/card/{RichContentCard → richContentCard}/RichContentCard.tsx +3 -10
  30. package/src/components/tag/Tag.module.css +9 -0
  31. package/src/components/tag/Tag.tsx +8 -0
  32. package/src/index.ts +8 -1
@@ -0,0 +1,39 @@
1
+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3
+
4
+ name: Node.js Package
5
+
6
+ on:
7
+ push:
8
+ branches:
9
+ - development
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ - uses: actions/setup-node@v3
17
+ with:
18
+ node-version: 16
19
+
20
+ publish-npm:
21
+ needs: build
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - uses: actions/checkout@v3
25
+ - uses: actions/setup-node@v3
26
+ with:
27
+ node-version: 16
28
+ registry-url: https://registry.npmjs.org/
29
+ - run: |
30
+ git --version
31
+ git config user.name "GitHub Version patch"
32
+ git config user.email "<>"
33
+ git checkout development
34
+ git clean -f -n
35
+ - run: npm install
36
+ - run: npm version patch
37
+ - run: npm publish
38
+ env:
39
+ NODE_AUTH_TOKEN: ${{secrets.npm_token}}
@@ -3,15 +3,13 @@ import { Divider, Link } from "@gemeente-denhaag/components-react";
3
3
  import { navigate } from "gatsby";
4
4
  import * as styles from "./RichContentCard.module.css";
5
5
  import { ExternalLinkIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
6
+ import { Tag } from "../../tag/Tag";
6
7
  export const RichContentCard = ({ link, labelsWithIcon, tags, contentLinks, linkIsExternal, }) => {
7
- return (_jsxs("div", { className: styles.container, children: [_jsx("div", { className: styles.link, onClick: () => navigate(link.href), children: _jsx(Link, { icon: linkIsExternal ? _jsx(ExternalLinkIcon, {}) : _jsx(ArrowRightIcon, {}), iconAlign: "start", children: link.label }) }), _jsx("div", { className: styles.labelsWithIcon, children: labelsWithIcon.map(({ label, icon }) => (_jsx(LabelWithIcon, { ...{ label, icon } }))) }), _jsx("div", { className: styles.tags, children: tags.map((tag) => (_jsx(Tag, { ...{ tag } }))) }), contentLinks && (_jsxs("div", { className: styles.contentLinks, children: [_jsx(Divider, {}), contentLinks.map(({ title, subTitle, href }) => (_jsx(ContentLink, { ...{ title, subTitle, href } })))] }))] }));
8
+ return (_jsxs("div", { className: styles.container, children: [_jsx("div", { className: styles.link, onClick: () => navigate(link.href), children: _jsx(Link, { icon: linkIsExternal ? _jsx(ExternalLinkIcon, {}) : _jsx(ArrowRightIcon, {}), iconAlign: "start", children: link.label }) }), _jsx("div", { className: styles.labelsWithIcon, children: labelsWithIcon.map(({ label, icon }) => (_jsx(LabelWithIcon, { ...{ label, icon } }))) }), _jsx("div", { className: styles.tags, children: tags.map((tag, idx) => (_jsx(Tag, { ...{ tag } }, idx))) }), contentLinks && (_jsxs("div", { className: styles.contentLinks, children: [_jsx(Divider, {}), contentLinks.map(({ title, subTitle, href }) => (_jsx(ContentLink, { ...{ title, subTitle, href } })))] }))] }));
8
9
  };
9
10
  const LabelWithIcon = ({ label, icon }) => {
10
11
  return (_jsxs("div", { className: styles.labelWithIcon, children: [_jsx("span", { className: styles.labelWithIcon_icon, children: icon }), _jsx("span", { className: styles.labelWithIcon_label, children: label })] }));
11
12
  };
12
- const Tag = ({ tag }) => {
13
- return _jsx("span", { className: styles.tag, children: tag });
14
- };
15
13
  const ContentLink = ({ title, subTitle, href }) => {
16
14
  return (_jsxs(Link, { className: styles.contentLink, children: [_jsxs("div", { className: styles.contentLink_content, children: [_jsx("span", { className: styles.contentLink_title, children: title }), _jsx("span", { className: styles.contentLink_subTitle, children: subTitle })] }), _jsx("div", { children: _jsx(ArrowRightIcon, {}) })] }));
17
15
  };
@@ -56,17 +56,6 @@
56
56
  font-size: var(--conduction-rich-card-label-with-icon-label-size);
57
57
  }
58
58
 
59
- /* Component: Tag */
60
- .tag {
61
- font-size: var(--conduction-tag-font-size);
62
- background-color: var(--denhaag-color-grey-1);
63
- border-radius: var(--nlportal-document-border-radius);
64
- padding-inline-start: var(--nlportal-space-inline-xs);
65
- padding-inline-end: var(--nlportal-space-inline-xs);
66
- padding-block-start: var(--nlportal-space-block-xs);
67
- padding-block-end: var(--nlportal-space-block-xs);
68
- }
69
-
70
59
  /* Content Link */
71
60
  .contentLink {
72
61
  display: flex;
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ interface DetailsCardProps {
3
+ title: string;
4
+ introduction: string;
5
+ link: {
6
+ href: string;
7
+ label: string;
8
+ };
9
+ tags?: string[];
10
+ subHeader?: string;
11
+ layoutClassName?: string;
12
+ }
13
+ export declare const DetailsCard: React.FC<DetailsCardProps>;
14
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as styles from "./DetailsCard.module.css";
3
+ import clsx from "clsx";
4
+ import { Link } from "@gemeente-denhaag/components-react";
5
+ import { navigate } from "gatsby";
6
+ import { ArrowRightIcon } from "@gemeente-denhaag/icons";
7
+ import { Tag } from "../../tag/Tag";
8
+ export const DetailsCard = ({ title, subHeader, introduction, link, tags, layoutClassName, }) => {
9
+ return (_jsx("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), onClick: () => navigate(link.href), children: _jsxs("div", { className: styles.content, children: [_jsxs("div", { children: [_jsx("div", { className: styles.title, children: title }), _jsx("span", { className: styles.subHeader, children: subHeader })] }), tags && (_jsx("div", { className: styles.tags, children: tags.map((tag, idx) => (_jsx(Tag, { ...{ tag } }, idx))) })), _jsx("div", { className: styles.introduction, children: introduction }), _jsx("div", { className: styles.link, children: _jsx(Link, { icon: _jsx(ArrowRightIcon, {}), iconAlign: "start", children: link.label }) })] }) }));
10
+ };
@@ -0,0 +1,48 @@
1
+ .container {
2
+ cursor: pointer;
3
+ overflow: hidden;
4
+ border-radius: var(--nlportal-document-border-radius);
5
+ }
6
+
7
+ .content {
8
+ display: flex;
9
+ flex-direction: column;
10
+ padding-inline-start: var(--nlportal-space-inline-lg);
11
+ padding-inline-end: var(--nlportal-space-inline-lg);
12
+ padding-block-start: var(--nlportal-space-block-lg);
13
+ padding-block-end: var(--nlportal-space-block-lg);
14
+ border: var(--nlportal-document-border, 1px solid);
15
+ }
16
+
17
+ .content > *:not(:last-child) {
18
+ margin-block-end: var(--nlportal-space-block-md);
19
+ }
20
+
21
+ .title {
22
+ font-size: var(--denhaag-typography-scale-xl-font-size);
23
+ font-weight: var(--conduction-image-and-details-card-title-font-weight);
24
+ }
25
+
26
+ .subHeader {
27
+ color: var(--denhaag-color-grey-3);
28
+ font-size: var(--denhaag-typography-scale-s-font-size);
29
+ }
30
+
31
+ .tags > *:not(:last-child) {
32
+ margin-inline-end: var(--nlportal-space-inline-md);
33
+ }
34
+
35
+ .introduction {
36
+ overflow: hidden;
37
+ text-overflow: ellipsis;
38
+ display: -webkit-box;
39
+ -webkit-line-clamp: var(
40
+ --conduction-image-and-details-card-introduction-lines-clamp
41
+ );
42
+ -webkit-box-orient: vertical;
43
+ }
44
+
45
+ .link {
46
+ display: flex;
47
+ justify-content: flex-end;
48
+ }
@@ -1,5 +1,6 @@
1
1
  import { DownloadCard } from "./downloadCard/DownloadCard";
2
- import { HorizontalImageCard } from "./HorizontalImageCard/HorizontalImageCard";
2
+ import { HorizontalImageCard } from "./horizontalImageCard/HorizontalImageCard";
3
3
  import { ImageAndDetailsCard } from "./imageAndDetailsCard/ImageAndDetailsCard";
4
- import { RichContentCard } from "./RichContentCard/RichContentCard";
5
- export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard };
4
+ import { RichContentCard } from "./richContentCard/RichContentCard";
5
+ import { DetailsCard } from "./detailsCard/DetailsCard";
6
+ export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard };
@@ -1,5 +1,6 @@
1
1
  import { DownloadCard } from "./downloadCard/DownloadCard";
2
- import { HorizontalImageCard } from "./HorizontalImageCard/HorizontalImageCard";
2
+ import { HorizontalImageCard } from "./horizontalImageCard/HorizontalImageCard";
3
3
  import { ImageAndDetailsCard } from "./imageAndDetailsCard/ImageAndDetailsCard";
4
- import { RichContentCard } from "./RichContentCard/RichContentCard";
5
- export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard };
4
+ import { RichContentCard } from "./richContentCard/RichContentCard";
5
+ import { DetailsCard } from "./detailsCard/DetailsCard";
6
+ export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard };
@@ -1,3 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { ICheckboxProps, IReactHookFormProps } from "./types";
2
+ import { IReactHookFormProps } from "./types";
3
+ export interface ICheckboxProps {
4
+ label: string;
5
+ name: string;
6
+ }
3
7
  export declare const InputCheckbox: React.FC<ICheckboxProps & IReactHookFormProps>;
@@ -1,5 +1,10 @@
1
1
  import * as React from "react";
2
- import { IInputProps, IReactHookFormProps } from "./types";
2
+ import { IReactHookFormProps } from "./types";
3
+ export interface IInputProps {
4
+ name: string;
5
+ disabled?: boolean;
6
+ defaultValue?: string;
7
+ }
3
8
  export declare const InputPassword: React.FC<IInputProps & IReactHookFormProps>;
4
9
  export declare const InputText: React.FC<IInputProps & IReactHookFormProps>;
5
10
  export declare const InputEmail: React.FC<IInputProps & IReactHookFormProps>;
@@ -1,3 +1,8 @@
1
1
  import * as React from "react";
2
- import { ITextAreaProps, IReactHookFormProps } from "./types";
2
+ import { IReactHookFormProps } from "./types";
3
+ export interface ITextAreaProps {
4
+ name: string;
5
+ disabled?: boolean;
6
+ defaultValue?: string;
7
+ }
3
8
  export declare const Textarea: React.FC<ITextAreaProps & IReactHookFormProps>;
@@ -4,17 +4,3 @@ export interface IReactHookFormProps {
4
4
  errors: FieldErrors;
5
5
  validation?: Omit<RegisterOptions<FieldValues, any>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
6
6
  }
7
- export interface IInputProps {
8
- name: string;
9
- disabled?: boolean;
10
- defaultValue?: string;
11
- }
12
- export interface ITextAreaProps {
13
- name: string;
14
- disabled?: boolean;
15
- defaultValue?: string;
16
- }
17
- export interface ICheckboxProps {
18
- label: string;
19
- name: string;
20
- }
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const Pagination: React.FC;
@@ -0,0 +1,6 @@
1
+ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import React from "react";
3
+ export const Pagination = () => {
4
+ const [count, setCount] = React.useState(0);
5
+ return (_jsxs(_Fragment, { children: ["Pagination", _jsxs("div", { children: ["Count: ", count] }), _jsx("button", { onClick: () => setCount(count + 1), children: "click me" })] }));
6
+ };
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ interface TagProps {
3
+ tag: string;
4
+ }
5
+ export declare const Tag: React.FC<TagProps>;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as styles from "./Tag.module.css";
3
+ export const Tag = ({ tag }) => _jsx("span", { className: styles.tag, children: tag });
@@ -0,0 +1,9 @@
1
+ .tag {
2
+ font-size: var(--conduction-tag-font-size);
3
+ background-color: var(--denhaag-color-grey-1);
4
+ border-radius: var(--nlportal-document-border-radius);
5
+ padding-inline-start: var(--nlportal-space-inline-xs);
6
+ padding-inline-end: var(--nlportal-space-inline-xs);
7
+ padding-block-start: var(--nlportal-space-block-xs);
8
+ padding-block-end: var(--nlportal-space-block-xs);
9
+ }
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard } from "./components/card";
1
+ import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard } from "./components/card";
2
2
  import { Container } from "./components/container/Container";
3
3
  import { Breadcrumbs } from "./components/denhaag-wrappers/breadcrumbs/Breadcrumbs";
4
4
  import { EditableTableRow } from "./components/editableTableRow/EditableTableRow";
@@ -9,4 +9,4 @@ import { MetaIcon } from "./components/metaIcon/MetaIcon";
9
9
  import { PrivateRoute } from "./components/privateRoute/PrivateRoute";
10
10
  import { StatusSteps } from "./components/statusSteps/StatusSteps";
11
11
  import { PrimaryTopNav, SecondaryTopNav } from "./components/topNav/TopNav";
12
- export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, };
12
+ export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, };
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard } from "./components/card";
1
+ import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, } from "./components/card";
2
2
  import { Container } from "./components/container/Container";
3
3
  import { Breadcrumbs } from "./components/denhaag-wrappers/breadcrumbs/Breadcrumbs";
4
4
  import { EditableTableRow } from "./components/editableTableRow/EditableTableRow";
@@ -9,4 +9,4 @@ import { MetaIcon } from "./components/metaIcon/MetaIcon";
9
9
  import { PrivateRoute } from "./components/privateRoute/PrivateRoute";
10
10
  import { StatusSteps } from "./components/statusSteps/StatusSteps";
11
11
  import { PrimaryTopNav, SecondaryTopNav } from "./components/topNav/TopNav";
12
- export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, };
12
+ export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/components",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -11,7 +11,12 @@
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/ConductionNL/conduction-components.git"
13
13
  },
14
- "keywords": ["React", "Gatsby", "Conduction", "Components"],
14
+ "keywords": [
15
+ "React",
16
+ "Gatsby",
17
+ "Conduction",
18
+ "Components"
19
+ ],
15
20
  "author": "Conduction B.V.",
16
21
  "license": "ISC",
17
22
  "bugs": {
@@ -0,0 +1,48 @@
1
+ .container {
2
+ cursor: pointer;
3
+ overflow: hidden;
4
+ border-radius: var(--nlportal-document-border-radius);
5
+ }
6
+
7
+ .content {
8
+ display: flex;
9
+ flex-direction: column;
10
+ padding-inline-start: var(--nlportal-space-inline-lg);
11
+ padding-inline-end: var(--nlportal-space-inline-lg);
12
+ padding-block-start: var(--nlportal-space-block-lg);
13
+ padding-block-end: var(--nlportal-space-block-lg);
14
+ border: var(--nlportal-document-border, 1px solid);
15
+ }
16
+
17
+ .content > *:not(:last-child) {
18
+ margin-block-end: var(--nlportal-space-block-md);
19
+ }
20
+
21
+ .title {
22
+ font-size: var(--denhaag-typography-scale-xl-font-size);
23
+ font-weight: var(--conduction-image-and-details-card-title-font-weight);
24
+ }
25
+
26
+ .subHeader {
27
+ color: var(--denhaag-color-grey-3);
28
+ font-size: var(--denhaag-typography-scale-s-font-size);
29
+ }
30
+
31
+ .tags > *:not(:last-child) {
32
+ margin-inline-end: var(--nlportal-space-inline-md);
33
+ }
34
+
35
+ .introduction {
36
+ overflow: hidden;
37
+ text-overflow: ellipsis;
38
+ display: -webkit-box;
39
+ -webkit-line-clamp: var(
40
+ --conduction-image-and-details-card-introduction-lines-clamp
41
+ );
42
+ -webkit-box-orient: vertical;
43
+ }
44
+
45
+ .link {
46
+ display: flex;
47
+ justify-content: flex-end;
48
+ }
@@ -0,0 +1,56 @@
1
+ import * as React from "react";
2
+ import * as styles from "./DetailsCard.module.css";
3
+ import clsx from "clsx";
4
+ import { Link } from "@gemeente-denhaag/components-react";
5
+ import { navigate } from "gatsby";
6
+ import { ArrowRightIcon } from "@gemeente-denhaag/icons";
7
+ import { Tag } from "../../tag/Tag";
8
+
9
+ interface DetailsCardProps {
10
+ title: string;
11
+ introduction: string;
12
+ link: {
13
+ href: string;
14
+ label: string;
15
+ };
16
+ tags?: string[];
17
+ subHeader?: string;
18
+ layoutClassName?: string;
19
+ }
20
+
21
+ export const DetailsCard: React.FC<DetailsCardProps> = ({
22
+ title,
23
+ subHeader,
24
+ introduction,
25
+ link,
26
+ tags,
27
+ layoutClassName,
28
+ }) => {
29
+ return (
30
+ <div className={clsx(styles.container, [layoutClassName && layoutClassName])} onClick={() => navigate(link.href)}>
31
+ <div className={styles.content}>
32
+ <div>
33
+ <div className={styles.title}>{title}</div>
34
+
35
+ <span className={styles.subHeader}>{subHeader}</span>
36
+ </div>
37
+
38
+ {tags && (
39
+ <div className={styles.tags}>
40
+ {tags.map((tag, idx) => (
41
+ <Tag key={idx} {...{ tag }} />
42
+ ))}
43
+ </div>
44
+ )}
45
+
46
+ <div className={styles.introduction}>{introduction}</div>
47
+
48
+ <div className={styles.link}>
49
+ <Link icon={<ArrowRightIcon />} iconAlign="start">
50
+ {link.label}
51
+ </Link>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ );
56
+ };
@@ -1,6 +1,7 @@
1
1
  import { DownloadCard } from "./downloadCard/DownloadCard";
2
- import { HorizontalImageCard } from "./HorizontalImageCard/HorizontalImageCard";
2
+ import { HorizontalImageCard } from "./horizontalImageCard/HorizontalImageCard";
3
3
  import { ImageAndDetailsCard } from "./imageAndDetailsCard/ImageAndDetailsCard";
4
- import { RichContentCard } from "./RichContentCard/RichContentCard";
4
+ import { RichContentCard } from "./richContentCard/RichContentCard";
5
+ import { DetailsCard } from "./detailsCard/DetailsCard";
5
6
 
6
- export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard };
7
+ export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard };
@@ -56,17 +56,6 @@
56
56
  font-size: var(--conduction-rich-card-label-with-icon-label-size);
57
57
  }
58
58
 
59
- /* Component: Tag */
60
- .tag {
61
- font-size: var(--conduction-tag-font-size);
62
- background-color: var(--denhaag-color-grey-1);
63
- border-radius: var(--nlportal-document-border-radius);
64
- padding-inline-start: var(--nlportal-space-inline-xs);
65
- padding-inline-end: var(--nlportal-space-inline-xs);
66
- padding-block-start: var(--nlportal-space-block-xs);
67
- padding-block-end: var(--nlportal-space-block-xs);
68
- }
69
-
70
59
  /* Content Link */
71
60
  .contentLink {
72
61
  display: flex;
@@ -3,6 +3,7 @@ import { navigate } from "gatsby";
3
3
  import * as React from "react";
4
4
  import * as styles from "./RichContentCard.module.css";
5
5
  import { ExternalLinkIcon, ArrowRightIcon } from "@gemeente-denhaag/icons";
6
+ import { Tag } from "../../tag/Tag";
6
7
 
7
8
  export interface RichContentCardProps {
8
9
  link: {
@@ -44,8 +45,8 @@ export const RichContentCard: React.FC<RichContentCardProps> = ({
44
45
  </div>
45
46
 
46
47
  <div className={styles.tags}>
47
- {tags.map((tag) => (
48
- <Tag {...{ tag }} />
48
+ {tags.map((tag, idx) => (
49
+ <Tag key={idx} {...{ tag }} />
49
50
  ))}
50
51
  </div>
51
52
 
@@ -75,14 +76,6 @@ const LabelWithIcon: React.FC<LabelWithIconProps> = ({ label, icon }) => {
75
76
  );
76
77
  };
77
78
 
78
- interface TagProps {
79
- tag: string;
80
- }
81
-
82
- const Tag: React.FC<TagProps> = ({ tag }) => {
83
- return <span className={styles.tag}>{tag}</span>;
84
- };
85
-
86
79
  interface ContentLinkProps {
87
80
  title: string;
88
81
  subTitle: string;
@@ -0,0 +1,9 @@
1
+ .tag {
2
+ font-size: var(--conduction-tag-font-size);
3
+ background-color: var(--denhaag-color-grey-1);
4
+ border-radius: var(--nlportal-document-border-radius);
5
+ padding-inline-start: var(--nlportal-space-inline-xs);
6
+ padding-inline-end: var(--nlportal-space-inline-xs);
7
+ padding-block-start: var(--nlportal-space-block-xs);
8
+ padding-block-end: var(--nlportal-space-block-xs);
9
+ }
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import * as styles from "./Tag.module.css";
3
+
4
+ interface TagProps {
5
+ tag: string;
6
+ }
7
+
8
+ export const Tag: React.FC<TagProps> = ({ tag }) => <span className={styles.tag}>{tag}</span>;
package/src/index.ts CHANGED
@@ -1,4 +1,10 @@
1
- import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard } from "./components/card";
1
+ import {
2
+ DownloadCard,
3
+ HorizontalImageCard,
4
+ ImageAndDetailsCard,
5
+ RichContentCard,
6
+ DetailsCard,
7
+ } from "./components/card";
2
8
  import { Container } from "./components/container/Container";
3
9
  import { Breadcrumbs } from "./components/denhaag-wrappers/breadcrumbs/Breadcrumbs";
4
10
  import { EditableTableRow } from "./components/editableTableRow/EditableTableRow";
@@ -23,6 +29,7 @@ export {
23
29
  HorizontalImageCard,
24
30
  ImageAndDetailsCard,
25
31
  RichContentCard,
32
+ DetailsCard,
26
33
  Container,
27
34
  Breadcrumbs,
28
35
  EditableTableRow,