Skip to content

Commit 5f04223

Browse files
committed
Apply latest eslint rules
1 parent 50a6c5e commit 5f04223

File tree

17 files changed

+67
-75
lines changed

17 files changed

+67
-75
lines changed

src/stories/Blocks/footer/Footer.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import React from "react";
21
import { Pagefold } from "../../Library/pagefold/Pagefold";
32
import { Accordion } from "../../Library/accordion/Accordion";
43
import { Dropdown } from "../../Library/dropdown/Dropdown";
54
import { Logo } from "../../Library/logo/Logo";
6-
import { list } from "../../Library/accordion/accordionList";
75
import { Links } from "../../Library/links/Links";
86
import { FooterColumn } from "./FooterColumn";
7+
import list from "../../Library/accordion/accordionList";
98

109
const dropdownList = [
1110
{

src/stories/Blocks/status-loans/statusLoans.stories.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
import { ComponentMeta, ComponentStory } from "@storybook/react";
2-
import {
3-
StatusLoans as StatusLoansComp,
4-
} from "./statusLoans";
2+
import { StatusLoans as StatusLoansComp } from "./statusLoans";
53

64
export default {
75
title: "Blocks / Userprofile / Status loans",
86
component: StatusLoansComp,
97
parameters: {
108
design: {
119
type: "figma",
12-
url:
13-
"https://www.figma.com/file/xouARmJCONbzbZhpD8XpcM/Brugerprofil?node-id=1239%3A66855",
10+
url: "https://www.figma.com/file/xouARmJCONbzbZhpD8XpcM/Brugerprofil?node-id=1239%3A66855",
1411
},
1512
},
1613
argTypes: {
@@ -42,8 +39,7 @@ export default {
4239
link: {
4340
defaultValue: {
4441
text: "Se titler du altid kan låne",
45-
link:
46-
"https://www.figma.com/file/xouARmJCONbzbZhpD8XpcM/Brugerprofil?node-id=1239%3A66855",
42+
link: "https://www.figma.com/file/xouARmJCONbzbZhpD8XpcM/Brugerprofil?node-id=1239%3A66855",
4743
},
4844
},
4945
},
@@ -53,4 +49,4 @@ const Template: ComponentStory<typeof StatusLoansComp> = (args) => (
5349
<StatusLoansComp {...args} />
5450
);
5551

56-
export const StatusLoans = Template.bind({});
52+
export const StatusLoans = Template.bind({});

src/stories/Library/Arrows/icon-arrow-accent/ArrowAccent.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Meta } from "@storybook/react";
22
import { withDesign } from "storybook-addon-designs";
3-
import { IconAccent as IconAccentComp } from "./ArrowAccent";
3+
import IconAccentComp from "./ArrowAccent";
44

55
const StoryBase: Meta = {
66
title: "Library / Arrows / Arrow Accent",

src/stories/Library/Arrows/icon-arrow-ui/ArrowUI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { InvalidProps } from "../../../../components/InvalidProps";
1+
import InvalidProps from "../../../../components/InvalidProps";
22

33
// Imported as components
44
import { ReactComponent as ArrowLargeLeft } from "./icon-arrow-ui-large-left.svg";

src/stories/Library/Lists/list-dashboard/ListDashboard.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import {
2-
StatusLabel,
3-
StatusLabelProps,
4-
} from "../../../Library/status-label/StatusLabel";
5-
import { Number, NumberProps } from "../../../Library/number/Number";
1+
import { StatusLabel, StatusLabelProps } from "../../status-label/StatusLabel";
2+
import { Number, NumberProps } from "../../number/Number";
63

74
export type ListDashboardProps = {
85
title: string;

src/stories/Library/Lists/list-details/ListDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Dropdown, DropdownProps } from "../../../Library/dropdown/Dropdown";
2-
import { Links } from "../../../Library/links/Links";
1+
import { Dropdown, DropdownProps } from "../../dropdown/Dropdown";
2+
import { Links } from "../../links/Links";
33

44
export type ListDetailsProps = {
55
title: string;

src/stories/Library/Lists/list-materials/ListMaterials.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { useState } from "react";
22
import { Checkbox } from "../../Forms/checkbox/Checkbox";
3-
import {
4-
StatusLabel,
5-
StatusLabelProps,
6-
} from "../../../Library/status-label/StatusLabel";
3+
import { StatusLabel, StatusLabelProps } from "../../status-label/StatusLabel";
74

85
export type ListMaterialsProps = {
96
title: string;

src/stories/Library/Lists/list-reservation/ListReservationsAndLoans.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import { Counter, CounterProps } from "../../../Library/counter/Counter";
2-
import {
3-
StatusLabel,
4-
StatusLabelProps,
5-
} from "../../../Library/status-label/StatusLabel";
6-
import { Material } from "../../../Library/material/Material";
1+
import { Counter, CounterProps } from "../../counter/Counter";
2+
import { StatusLabel, StatusLabelProps } from "../../status-label/StatusLabel";
3+
import { Material } from "../../material/Material";
74

85
export type ListReservationsAndLoansProps = {
96
material: {

src/stories/Library/Modals/modal-loan/ModalLoan.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { LinkFilters } from "../../link-filters/LinkFilters";
88
import {
99
ListMaterials,
1010
ListMaterialsProps,
11-
} from "../..//Lists/list-materials/ListMaterials";
11+
} from "../../Lists/list-materials/ListMaterials";
1212
import { WarningStatus } from "../../warning-status/WarningStatus";
1313

1414
type LoanMaterials = Array<{

src/stories/Library/Modals/modal-text/ModalText.tsx

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,23 @@ export type ModalTextProps = {
1515
title: string;
1616
text: string;
1717
}>;
18+
showModalProp: boolean;
1819
};
1920

2021
export const ModalText = (props: ModalTextProps) => {
21-
const [showModal, setShow] = useState(props.showModal);
22+
const {
23+
title,
24+
subtitle,
25+
textContent,
26+
linkText,
27+
btnLabel,
28+
showModal: showModalProp,
29+
} = props;
30+
const [showModal, setShow] = useState(showModalProp);
2231

2332
useEffect(() => {
24-
setShow(props.showModal);
25-
}, [props.showModal]);
33+
setShow(showModalProp);
34+
}, [showModalProp]);
2635

2736
const toggleModal = () => {
2837
setShow(!showModal);
@@ -40,12 +49,12 @@ export const ModalText = (props: ModalTextProps) => {
4049
>
4150
<ModalCloseButton toggleModal={toggleModal} />
4251
<div className="modal-text__container color-secondary-gray">
43-
<h3 className="text-header-h3">{props.title}</h3>
52+
<h3 className="text-header-h3">{title}</h3>
4453

45-
<p className="mt-48 text-body-large">{props.subtitle}</p>
54+
<p className="mt-48 text-body-large">{subtitle}</p>
4655

4756
<div className="mt-48">
48-
{props.textContent.map((row) => (
57+
{textContent.map((row) => (
4958
<div className="modal-text__content">
5059
<p className="text-body-medium-regular">{row.title}</p>
5160
<p className="text-links">{row.text}</p>
@@ -56,17 +65,17 @@ export const ModalText = (props: ModalTextProps) => {
5665
<div className="modal-text__buttons">
5766
<div className="modal-text__buttons-inner">
5867
<Links
59-
href={"/"}
60-
linkText={props.linkText}
68+
href="/"
69+
linkText={linkText}
6170
classNames="color-secondary-gray"
6271
/>
6372
<Button
6473
buttonType="default"
6574
size="large"
6675
variant="filled"
67-
label={props.btnLabel}
76+
label={btnLabel}
6877
disabled={false}
69-
collapsible={true}
78+
collapsible
7079
/>
7180
</div>
7281
</div>
@@ -77,17 +86,14 @@ export const ModalText = (props: ModalTextProps) => {
7786
export const textContent = [
7887
{
7988
title: "Brug bibliotekerne",
80-
text:
81-
"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
89+
text: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
8290
},
8391
{
8492
title: "Dataforordning",
85-
text:
86-
"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
93+
text: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
8794
},
8895
{
8996
title: "Lorem Ipsum",
90-
text:
91-
"Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci",
97+
text: "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci",
9298
},
9399
];

0 commit comments

Comments
 (0)