-
Notifications
You must be signed in to change notification settings - Fork 1
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 #44 from mnsinri/dev
feat: setting menu
- Loading branch information
Showing
32 changed files
with
622 additions
and
123 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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const blue = { | ||
50: "#ebeaf9", | ||
100: "#ccc9ef", | ||
200: "#aaa6e4", | ||
300: "#8983d8", | ||
400: "#7266cf", //vspo blue | ||
500: "#5e49c5", | ||
600: "#5840ba", | ||
700: "#5035ad", | ||
800: "#482aa2", | ||
900: "#3d128b", | ||
}; | ||
|
||
export default blue; |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// https://github.com/mui/material-ui/blob/master/packages/mui-material/src/colors/common.js | ||
const common = { | ||
black: "#000", | ||
white: "#fff", | ||
}; | ||
|
||
export default common; |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// https://github.com/mui/material-ui/blob/master/packages/mui-material/src/colors/grey.js | ||
const grey = { | ||
50: "#fafafa", | ||
100: "#f5f5f5", | ||
200: "#eeeeee", | ||
300: "#e0e0e0", | ||
400: "#bdbdbd", | ||
500: "#9e9e9e", | ||
600: "#757575", | ||
700: "#616161", | ||
800: "#424242", | ||
900: "#212121", | ||
A100: "#f5f5f5", | ||
A200: "#eeeeee", | ||
A400: "#bdbdbd", | ||
A700: "#616161", | ||
}; | ||
|
||
export default grey; |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const icon = { | ||
youtube: "#ff0000", | ||
twitch: "#9146FF", | ||
twitCasting: "#0092fa", | ||
}; | ||
|
||
export default icon; |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export { default as common } from "./common"; | ||
export { default as grey } from "./grey"; | ||
export { default as pink } from "./pink"; | ||
export { default as blue } from "./blue"; | ||
export { default as icon } from "./icon"; |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const pink = { | ||
50: "#fee6ef", | ||
100: "#fec1d8", | ||
200: "#fe98be", | ||
300: "#ff6fa4", //vspo pink | ||
400: "#fe508e", | ||
500: "#ff3679", | ||
600: "#ed3375", | ||
700: "#d52f6f", | ||
800: "#c02b6a", | ||
900: "#992462", | ||
}; | ||
|
||
export default pink; |
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
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
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import React, { createContext, createRef } from "react"; | ||
import { ChildrenNode } from "../../types"; | ||
import { useBoolStateCache } from "../../hooks"; | ||
|
||
type ConfigSetter = { | ||
setExpandAlways: React.Dispatch<React.SetStateAction<boolean>>; | ||
setMarquee: React.Dispatch<React.SetStateAction<boolean>>; | ||
}; | ||
|
||
type Config = { | ||
scrollContainerRef: React.RefObject<HTMLDivElement>; | ||
isExpandAlways: boolean; | ||
isMarquee: boolean; | ||
}; | ||
|
||
type ContextType = { | ||
config: Config; | ||
configSetter: ConfigSetter; | ||
}; | ||
|
||
const initState = { | ||
config: { | ||
scrollContainerRef: null!, | ||
isExpandAlways: true, | ||
isMarquee: true, | ||
}, | ||
configSetter: { | ||
setExpandAlways: null!, | ||
setMarquee: null!, | ||
}, | ||
}; | ||
|
||
export const ConfigContext = createContext<ContextType>(initState); | ||
const scrollContainerRef = createRef<HTMLDivElement>(); | ||
|
||
export const ConfigProvider: React.FC<ChildrenNode> = ({ children }) => { | ||
const [isExpandAlways, setExpandAlways] = useBoolStateCache( | ||
"isExpandAlways", | ||
initState.config.isExpandAlways | ||
); | ||
|
||
const [isMarquee, setMarquee] = useBoolStateCache( | ||
"isMarquee", | ||
initState.config.isMarquee | ||
); | ||
|
||
return ( | ||
<ConfigContext.Provider | ||
value={{ | ||
config: { scrollContainerRef, isExpandAlways, isMarquee }, | ||
configSetter: { setExpandAlways, setMarquee }, | ||
}} | ||
> | ||
{children} | ||
</ConfigContext.Provider> | ||
); | ||
}; |
Oops, something went wrong.