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

Move logo to design system #1672

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Box from '../Box';
import VisuallyHidden from '../VisuallyHidden';
import { Media } from '../Media';
import Icon from '../../design-system/components/Icon';
import Logo from '../Logo';
import Logo from '../../design-system/components/Logo';

import MainMenu from './MainMenu';
import { useMapState } from '../MapState';
Expand Down
3 changes: 0 additions & 3 deletions src/components/Logo/Logo.md

This file was deleted.

9 changes: 0 additions & 9 deletions src/components/Logo/Logo.stories.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/PageLoading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import Box from './Box';
import Spacer from './Spacer';
import Text from './Text';
import Logo from './Logo';
import Logo from '../design-system/components/Logo';

const PageLoading = () => (
<Box
Expand Down
3 changes: 3 additions & 0 deletions src/design-system/components/Logo/Logo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.logo {
width: 154px;
}
15 changes: 15 additions & 0 deletions src/design-system/components/Logo/Logo.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Meta, StoryObj } from '@storybook/react';

import Logo from './Logo';

export default {
title: 'Design-System/Logo',
component: Logo,
tags: ['autodocs'],
} as Meta;

export const Default: StoryObj<typeof Logo> = {
render: () => {
return <Logo />;
},
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import React from 'react';

import Image from 'next/legacy/image';
import Box from '../Box';
import logo from '../../../public/logo.svg';
import Image from 'next/image';
import logo from '../../../../public/logo.svg';

const Logo = React.forwardRef<HTMLDivElement>((props, ref) => (
<Box width="154px" ref={ref}>
<div className="logo" ref={ref}>
<Image
src={logo}
alt="The Great British Toilet Map"
Expand All @@ -14,7 +12,7 @@ const Logo = React.forwardRef<HTMLDivElement>((props, ref) => (
priority={true}
{...props}
/>
</Box>
</div>
));

// eslint-disable-next-line functional/immutable-data
Expand Down
1 change: 1 addition & 0 deletions src/design-system/components/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@import 'src/design-system/components/Switch/Switch.css';
@import 'src/design-system/components/TextArea/TextArea.css';
@import 'src/design-system/components/Drawer/Drawer.css';
@import 'src/design-system/components/Logo/Logo.css';

/* Leaflet Marker Cluster custom styles */
.leaflet-marker-icon.marker-cluster {
Expand Down
Loading