Procházet zdrojové kódy

Introduce Container and Header components

Tatiana Inama před 5 roky
rodič
revize
62f4dc0a35

+ 3 - 0
next-recipes/components/Layout/Container/container.module.css

@@ -0,0 +1,3 @@
+.container {
+  @apply p-4;
+}

+ 11 - 0
next-recipes/components/Layout/Container/index.tsx

@@ -0,0 +1,11 @@
+import { FunctionComponent } from 'react';
+import styles from './container.module.css';
+
+interface ContainerProps {
+};
+
+const Container: FunctionComponent<ContainerProps> = ({ children }) => (
+  <div className={styles.container}>{children}</div>
+);
+
+export default Container;

+ 3 - 0
next-recipes/components/Layout/Header/header.module.css

@@ -0,0 +1,3 @@
+.headerContainer {
+  @apply sticky top-0 p-4 z-10 bg-white;
+}

+ 13 - 0
next-recipes/components/Layout/Header/index.tsx

@@ -0,0 +1,13 @@
+import { FunctionComponent } from 'react';
+
+import styles from './header.module.css';
+
+interface HeaderProps { };
+
+const Header: FunctionComponent<HeaderProps> = ({ children }) => {
+  return (
+    <div className={styles.headerContainer}>{children}</div>
+  );
+};
+
+export default Header;

+ 1 - 3
next-recipes/components/Layout/layout.module.css

@@ -1,3 +1 @@
-.layout {
-  @apply p-4;
-}
+.layout {}