🔧 config: src folders structure

:%s
This commit is contained in:
lytrankieio123
2021-08-20 09:29:58 +07:00
parent 0f82dfdcba
commit d3c94cfb79
19 changed files with 263 additions and 50 deletions

View File

@@ -0,0 +1,5 @@
/* style demo here */
.buttonCommon {
color: red;
}

View File

@@ -0,0 +1,15 @@
import { FC, useRef, useEffect } from 'react'
import s from './ButtonCommon.module.css'
interface Props {
className?: string
children?: any
}
const ButtonCommon: FC<Props> = ({ }) => {
return (
<div className={s.buttonCommon}>This is button common</div>
)
}
export default ButtonCommon

View File

@@ -0,0 +1,5 @@
/* style demo here */
.header {
color: green;
}

View File

@@ -0,0 +1,15 @@
import { FC, useRef, useEffect } from 'react'
import s from './Header.module.css'
interface Props {
className?: string
children?: any
}
const Header: FC<Props> = ({ }) => {
return (
<div className={s.header}>This is Header</div>
)
}
export default Header

View File

@@ -0,0 +1,24 @@
import { FC, useRef, useEffect } from 'react'
import Header from '../Header/Header'
import { CommerceProvider } from '@framework'
import { useRouter } from 'next/router'
interface Props {
className?: string
children?: any
}
// note: demo code
const Layout: FC<Props> = ({ children }) => {
const { locale = 'en-US' } = useRouter()
return (
<CommerceProvider locale={locale}>
<Header />
<main>{children}</main>
</CommerceProvider>
)
}
export default Layout

View File

@@ -0,0 +1,3 @@
export { default as ButtonCommon } from './ButtonCommon/ButtonCommon'
export { default as Layout } from './Layout/Layout'

View File

@@ -0,0 +1 @@
// index here

View File

@@ -0,0 +1 @@
// index here

View File

@@ -0,0 +1,5 @@
/* style demo here */
.homeBanner {
color: green;
}

View File

@@ -0,0 +1,15 @@
import { FC } from 'react'
import s from './HomeBanner.module.css'
interface Props {
className?: string
children?: any
}
const HomeBanner: FC<Props> = ({ }) => {
return (
<div className={s.homeBanner}>This is HomeBanner</div>
)
}
export default HomeBanner

View File

@@ -0,0 +1 @@
export { default as HomeBanner } from './HomeBanner/HomeBanner'