Skip to content

Commit

Permalink
chore: delete AltinnContentIcon (#13893)
Browse files Browse the repository at this point in the history
  • Loading branch information
wrt95 authored Oct 28, 2024
1 parent 4fe7cca commit 4f52f21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import React from 'react';
import React, { type ReactNode } from 'react';
import type { IContentLoaderProps } from 'react-content-loader';
import ContentLoader from 'react-content-loader';
import AltinnContentIconComponent from '../atoms/AltinnContentIcon';

export type IAltinnContentLoaderProps = {
/** The height of the loader, defaults to 200 */
height?: number;
/** The width of the loader, defaults to 400 */
width?: number;
children: ReactNode;
} & IContentLoaderProps;

export const AltinnContentLoader = (props: React.PropsWithChildren<IAltinnContentLoaderProps>) => {
export const AltinnContentLoader = ({
height,
width,
children,
...rest
}: IAltinnContentLoaderProps) => {
return (
<ContentLoader
height={props.height ? props.height : 200}
width={props.width ? props.width : 400}
{...props}
>
{props.children ? props.children : <AltinnContentIconComponent />}
<ContentLoader height={height ? height : 200} width={width ? width : 400} {...rest}>
{children}
</ContentLoader>
);
};

0 comments on commit 4f52f21

Please sign in to comment.