-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from boatnoodle/develop
update style by eyor
- Loading branch information
Showing
11 changed files
with
283 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
/public/ | ||
/node_modules/ | ||
/.next | ||
/public | ||
/public | ||
/utils | ||
/providers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
interface Window { | ||
__REDUX_DEVTOOLS_EXTENSION__: any; | ||
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__: any; | ||
__REACT_DEVTOOLS_GLOBAL_HOOK__: any; | ||
__REDUX_DEVTOOLS_EXTENSION__: any; | ||
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__: any; | ||
__REACT_DEVTOOLS_GLOBAL_HOOK__: any; | ||
} | ||
declare module '*.png' { | ||
const resource: string; | ||
export = resource; | ||
const resource: string; | ||
export = resource; | ||
} | ||
declare module '*.svg' { | ||
const resource: string; | ||
export = resource; | ||
const resource: string; | ||
export = resource; | ||
} | ||
declare module '*.css' { | ||
const resource: any; | ||
export = resource; | ||
const resource: any; | ||
export = resource; | ||
} | ||
declare module '*.pcss' { | ||
const resource: string; | ||
export = resource; | ||
const resource: string; | ||
export = resource; | ||
} | ||
declare module '*.json' { | ||
const resource: any; | ||
export = resource; | ||
const resource: any; | ||
export = resource; | ||
} | ||
|
||
declare namespace NodeJS { | ||
interface Process { | ||
browser: boolean; | ||
} | ||
export interface Global { | ||
window: any; | ||
fetch: any; | ||
} | ||
interface Process { | ||
browser: boolean; | ||
} | ||
export interface Global { | ||
window: any; | ||
fetch: any; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import React from 'react'; | ||
|
||
export interface UserSession { | ||
initializing: boolean; | ||
user?: any; | ||
initializing: boolean; | ||
user?: any; | ||
} | ||
|
||
export const UserContext = React.createContext<UserSession>({ | ||
initializing: true, | ||
user: null, | ||
initializing: true, | ||
user: null, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,79 @@ | ||
import React, { FunctionComponent, Fragment } from 'react'; | ||
import { Tabs, Icon } from 'antd'; | ||
import React, { FunctionComponent } from 'react'; | ||
import { Tabs } from 'antd'; | ||
import IconHot from '../../../assets/icons/icon-hot.svg'; | ||
import IconTime from '../../../assets/icons/icon-time.svg'; | ||
import IconHashTag from '../../../assets/icons/icon-hastag.svg'; | ||
import IconLike from '../../../assets/icons/icon-like.svg'; | ||
import Styled from 'styled-components'; | ||
|
||
const { TabPane } = Tabs; | ||
const tabLists = [ | ||
{ | ||
icon: <IconHot />, | ||
content: 'test', | ||
title: 'กระแส', | ||
}, | ||
{ | ||
icon: <IconTime />, | ||
content: 'test', | ||
title: 'ล่าสุด', | ||
}, | ||
{ | ||
icon: <IconHashTag />, | ||
content: 'test', | ||
title: 'มาแรง', | ||
}, | ||
{ | ||
icon: <IconLike />, | ||
content: 'test', | ||
title: 'แนะนำสำหรับคุณ', | ||
}, | ||
]; | ||
const Span = Styled.span` | ||
& path.a,& path.b{ | ||
fill: #657786; | ||
}, | ||
& svg{ | ||
color:#657786; | ||
display:flex; | ||
} | ||
`; | ||
const AddReviewBtn = Styled.button` | ||
position: absolute; | ||
top: 0; | ||
right: 10px; | ||
border-radius: 21px; | ||
border: 0; | ||
background: #17BF63; | ||
color: white; | ||
padding: 8px 35px; | ||
`; | ||
|
||
const TabsStyled = Styled(Tabs)` | ||
.ant-tabs-tab-active span path{ | ||
fill: #17BF63 !important; | ||
} | ||
`; | ||
export const TabPaneComponent: FunctionComponent = () => { | ||
return ( | ||
<Tabs defaultActiveKey="2"> | ||
<TabPane tab={<span>Tab 1</span>} key="1"> | ||
Tab 1 | ||
</TabPane> | ||
<TabPane | ||
tab={ | ||
<span> | ||
<Icon type="android" /> | ||
Tab 2 | ||
</span> | ||
} | ||
key="2" | ||
> | ||
Tab 2 | ||
</TabPane> | ||
</Tabs> | ||
<React.Fragment> | ||
<TabsStyled defaultActiveKey="0"> | ||
{tabLists.map(({ icon, content, title }, index) => ( | ||
<TabPane | ||
tab={ | ||
<Span> | ||
{icon} | ||
{title} | ||
</Span> | ||
} | ||
key={String(index)} | ||
> | ||
{content} | ||
</TabPane> | ||
))} | ||
</TabsStyled> | ||
<AddReviewBtn>เขียนรีวิว</AddReviewBtn> | ||
</React.Fragment> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.