Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file renaming, removed some files, changes to types, add variant to inputs #313

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
"namedComponents": "function-declaration",
"unnamedComponents": "function-declaration"
}
]
}
Expand Down
24 changes: 4 additions & 20 deletions src/Components/Cards/Card/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
import { Heading, Box, Flex, Text, useStyleConfig } from '@chakra-ui/react';
import React, { ReactElement } from 'react';

type CardProps = {
title: string;
body: string;
textColors?: string;
titleTextColor?: string;
bodyTextColor?: string;
titleTextSize?: string;
bodyTextSize?: string;
onClick?: () => void;
titleIcon?: ReactElement;
actionIcon?: ReactElement;
cardHeight?: string | (number | string)[];
cardWidth?: string | (number | string)[];

};
import { CardProps } from 'Types';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Det som endres sammen, bør ligge sammen. Med mindre CardProps brukes noen andre steder, er det ikke hensiktsmessig å flytte det ut av denne fila. Det skaper lenger avstand

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jeg syns det er fint at vi er konsekvente så i så fall så bør vi flytte typen inn til komponentens egen fil, men det kan vi jo ikke gjøre for alle. Syns det koster ekstremt lite å ctrl klikke på typen for å komme rett til definisjonen uansett hvor den ligger..


const Card = (props: CardProps): ReactElement => {
const {
Expand All @@ -31,17 +16,16 @@ const Card = (props: CardProps): ReactElement => {
actionIcon,
cardHeight,
cardWidth,

} = props;

const cardStyles = useStyleConfig('Card');

return (
<Box
__css={cardStyles}
sx={cardStyles}
onClick={onClick}
height={cardHeight || undefined}
width={cardWidth || undefined}
height={cardHeight}
width={cardWidth}
>
<Flex direction="column" justify="space-between">
<Flex width="100%" direction="row" align="center">
Expand Down

This file was deleted.

32 changes: 0 additions & 32 deletions src/Components/Containers/ContentContainer/ContentContainer.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/Components/Containers/ContentContainer/index.ts

This file was deleted.

152 changes: 0 additions & 152 deletions src/Components/Containers/PageContainer/PageContainer.stories.mdx

This file was deleted.

92 changes: 0 additions & 92 deletions src/Components/Containers/PageContainer/PageContainer.test.tsx

This file was deleted.

Loading