feat(components): unify api
This commit is contained in:
18
src/components/index.js
Normal file
18
src/components/index.js
Normal file
@@ -0,0 +1,18 @@
|
||||
export { default as Button } from "./button";
|
||||
export { default as Card } from "./card";
|
||||
export { default as Content } from "./content";
|
||||
export { default as CustomSlick } from "./custom-slick";
|
||||
export { default as Footer } from "./footer";
|
||||
export { default as HeaderLogo } from "./header-logo";
|
||||
export { default as Header } from "./header";
|
||||
export { default as Icon } from "./icon";
|
||||
export { default as IconWithContent } from "./icon-with-content";
|
||||
export { default as InputText } from "./input-text";
|
||||
export { default as Link } from "./link";
|
||||
export { default as MenuButton } from "./menu-button";
|
||||
export { default as NavItem } from "./nav-item";
|
||||
export { default as NavLink } from "./nav-link";
|
||||
export { default as Nav } from "./nav";
|
||||
export { default as ReviewSummary } from "./review-summary";
|
||||
export { default as Section } from "./section";
|
||||
export { default as Text } from "./text";
|
||||
@@ -1,8 +1,7 @@
|
||||
import React, { useState } from "react";
|
||||
import { useStaticQuery, graphql } from "gatsby";
|
||||
import { Helmet } from "react-helmet";
|
||||
import Nav from "./components/nav";
|
||||
import Footer from "./components/footer";
|
||||
import { Footer, Nav } from "./components";
|
||||
import { createGlobalStyle } from "styled-components";
|
||||
import "@fontsource/cooper-hewitt/400.css";
|
||||
import "@fontsource/cooper-hewitt/400-italic.css";
|
||||
@@ -26,6 +25,8 @@ const GlobalStyle = createGlobalStyle`
|
||||
--font-size-lg: 20px;
|
||||
--font-size-xl: 24px;
|
||||
--font-size-xxl: 32px;
|
||||
--icon-size-md: 16px;
|
||||
--icon-size-lg: 24px;
|
||||
|
||||
--spacing-y-xs: 4px;
|
||||
--spacing-y-sm: 8px;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import React from "react";
|
||||
import { Link, graphql } from "gatsby";
|
||||
import { graphql } from "gatsby";
|
||||
import Layout from "../layout";
|
||||
import Header from "../components/header";
|
||||
import HeaderLogo from "../components/header-logo";
|
||||
import Section from "../components/section";
|
||||
import { Header, Link, Section } from "../components";
|
||||
|
||||
export default function Index({ data }) {
|
||||
return (
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
import React from "react";
|
||||
import { graphql } from "gatsby";
|
||||
import Layout from "../layout";
|
||||
import Header from "../components/header";
|
||||
import HeaderLogo from "../components/header-logo";
|
||||
import Section from "../components/section";
|
||||
import Text from "../components/text";
|
||||
|
||||
export default function Index({ data }) {
|
||||
return (
|
||||
<Layout>
|
||||
<Header image={data.headerImage.childImageSharp.fluid}>
|
||||
<HeaderLogo>
|
||||
<h1>ABC Project Design</h1>
|
||||
<p>Easy as ABC</p>
|
||||
</HeaderLogo>
|
||||
</Header>
|
||||
<Section>
|
||||
<Text
|
||||
style={{
|
||||
"background-color": "var(--theme-color-primary)"
|
||||
}}
|
||||
>
|
||||
--theme-color-primary: #9c0905;
|
||||
</Text>
|
||||
<Text
|
||||
style={{
|
||||
"background-color": "var(--theme-color-secondary)"
|
||||
}}
|
||||
>
|
||||
--theme-color-secondary: #9590a8;
|
||||
</Text>
|
||||
<Text
|
||||
style={{
|
||||
"background-color": "var(--theme-color-tertiary)"
|
||||
}}
|
||||
>
|
||||
--theme-color-tertiary: #bbcbcb;
|
||||
</Text>
|
||||
<Text
|
||||
style={{
|
||||
"background-color": "var(--theme-color-light)"
|
||||
}}
|
||||
>
|
||||
--theme-color-light: #e5ffde;
|
||||
</Text>
|
||||
<Text
|
||||
style={{
|
||||
"background-color": "var(--theme-color-dark)",
|
||||
color: "white"
|
||||
}}
|
||||
>
|
||||
--theme-color-dark: #000a61;
|
||||
</Text>
|
||||
</Section>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
export const query = graphql`
|
||||
query {
|
||||
headerImage: file(relativePath: { eq: "bathroom.png" }) {
|
||||
childImageSharp {
|
||||
fluid(maxWidth: 1920, quality: 100) {
|
||||
...GatsbyImageSharpFluid_withWebp
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -1,13 +1,15 @@
|
||||
import React from "react";
|
||||
import { graphql } from "gatsby";
|
||||
import Layout from "../layout";
|
||||
import Header from "../components/header";
|
||||
import HeaderLogo from "../components/header-logo";
|
||||
import Section from "../components/section";
|
||||
import Card from "../components/card";
|
||||
import ReviewSummary from "../components/review-summary";
|
||||
import CustomSlick from "../components/custom-slick";
|
||||
import Text from "../components/text";
|
||||
import {
|
||||
Card,
|
||||
CustomSlick,
|
||||
Header,
|
||||
HeaderLogo,
|
||||
ReviewSummary,
|
||||
Section,
|
||||
Text
|
||||
} from "../components";
|
||||
|
||||
export default function Index({ data }) {
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { graphql } from "gatsby";
|
||||
import Layout from "../../layout";
|
||||
import Header from "../../components/header";
|
||||
import { Header } from "../../components";
|
||||
|
||||
export default function Index({ data }) {
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { graphql } from "gatsby";
|
||||
import Layout from "../../layout";
|
||||
import Header from "../../components/header";
|
||||
import { Header } from "../../components";
|
||||
|
||||
export default function Index({ data }) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user