Open hours to separate component
This commit is contained in:
15
components/OpenHours.tsx
Normal file
15
components/OpenHours.tsx
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import styles from '../styles/OpenHours.module.scss';
|
||||||
|
|
||||||
|
export const OpenHours = () => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<h2 className={styles.openHoursTitle}>Auki:</h2>
|
||||||
|
<p className={styles.openHoursText}>ma-la 12:00-19:00</p>
|
||||||
|
<p className={styles.openHoursDesc}>
|
||||||
|
kysynnän ja sään salliessa myös pidempään
|
||||||
|
</p>
|
||||||
|
<h2 className={styles.openHoursTitle}>Tervetuloa!</h2>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import styles from '../styles/Index.module.scss';
|
import styles from '../styles/Index.module.scss';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
|
import { OpenHours } from '../components/OpenHours';
|
||||||
|
|
||||||
export default function Index() {
|
export default function Index() {
|
||||||
return (
|
return (
|
||||||
@@ -20,15 +21,7 @@ export default function Index() {
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section className={styles.sectionContainer}>
|
<section className={styles.sectionContainer}>
|
||||||
<h2 className={styles.openHoursTitle}>Auki:</h2>
|
<OpenHours />
|
||||||
<p className={styles.openHoursText}>ma-la 12:00-19:00</p>
|
|
||||||
<p className={styles.openHoursDesc}>
|
|
||||||
kysynnän ja sään salliessa myös pidempään
|
|
||||||
</p>
|
|
||||||
<h2 className={styles.openHoursTitle}>Tervetuloa!</h2>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section className={styles.sectionContainer}>
|
|
||||||
<Image
|
<Image
|
||||||
className={styles.keepersImage}
|
className={styles.keepersImage}
|
||||||
src='/elvira-iveta.png'
|
src='/elvira-iveta.png'
|
||||||
@@ -133,6 +126,10 @@ export default function Index() {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<span className={styles.separator} />
|
<span className={styles.separator} />
|
||||||
|
|
||||||
|
<section className={styles.sectionContainer}>
|
||||||
|
<OpenHours />
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -42,22 +42,6 @@
|
|||||||
letter-spacing: normal;
|
letter-spacing: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openHoursTitle {
|
|
||||||
font-weight: 700;
|
|
||||||
margin: 0;
|
|
||||||
font-size: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openHoursText {
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openHoursDesc {
|
|
||||||
max-width: 15rem;
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.keepersImage {
|
.keepersImage {
|
||||||
max-width: 150px;
|
max-width: 150px;
|
||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
|
|||||||
16
styles/OpenHours.module.scss
Normal file
16
styles/OpenHours.module.scss
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
.openHoursTitle {
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 100%;
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openHoursText {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openHoursDesc {
|
||||||
|
max-width: 15rem;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user