diff --git a/src/components/contextMenu/ColorItem.tsx b/src/components/contextMenu/ColorItem.tsx index 32bf946..d35e00b 100644 --- a/src/components/contextMenu/ColorItem.tsx +++ b/src/components/contextMenu/ColorItem.tsx @@ -1,37 +1,37 @@ -import styled from 'styled-components' +import styled from "styled-components"; // lib -import * as styles from 'lib/styles/styles' -import palette from 'lib/styles/palette' +import * as styles from "lib/styles/styles"; +import palette from "lib/styles/palette"; -const ColorItem = ({ name, color, onClick }: Props) => { +const ColorItem = ({ color, onClick }: Props) => { const onClickItem = (e: any) => { onClick(); e.target.blur(); }; return ( - - - - - {name} - + <> + + + + + + ); -} +}; const Wrapper = styled.button` - display: flex; - align-items: center; - justify-content: center; - width: 100%; height: 32px; + width: 50px; + text-align: -webkit-center; border-radius: 6px; cursor: pointer; - background-color: rgba(0,0,0,0); - transition: .1s ${styles.transition}; + background-color: rgba(0, 0, 0, 0); + transition: 0.1s ${styles.transition}; outline: none; - &:hover, &:focus { + &:hover, + &:focus { background-color: ${palette.blue3}; & > span { @@ -45,7 +45,6 @@ const ColorWrapper = styled.div` height: 16px; border-radius: 16px; background-color: #fff; - margin-right: 16px; `; const Color = styled.div<{ color: string }>` @@ -53,7 +52,7 @@ const Color = styled.div<{ color: string }>` height: 16px; border-radius: 16px; background-color: ${({ color }) => color}; - opacity: .4; + opacity: 0.4; `; const Message = styled.span` @@ -64,9 +63,8 @@ const Message = styled.span` `; interface Props { - name: string; color: string; onClick: () => void; } -export default ColorItem \ No newline at end of file +export default ColorItem; diff --git a/src/components/contextMenu/Item.tsx b/src/components/contextMenu/Item.tsx index ee836f4..2f65346 100644 --- a/src/components/contextMenu/Item.tsx +++ b/src/components/contextMenu/Item.tsx @@ -1,11 +1,15 @@ -import styled from 'styled-components' +import styled from "styled-components"; // lib -import * as styles from 'lib/styles/styles' -import palette from 'lib/styles/palette' +import * as styles from "lib/styles/styles"; +import palette from "lib/styles/palette"; const Item = ({ text, onClick }: Props) => { - return {text}; -} + return ( + <> + {text} + + ); +}; const Container = styled.button` width: 100%; @@ -14,13 +18,14 @@ const Container = styled.button` text-align: center; font-size: 14px; color: #fff; - transition: .1s ${styles.transition}; - background-color: rgba(0,0,0,0); + transition: 0.1s ${styles.transition}; + background-color: rgba(0, 0, 0, 0); border-radius: 6px; cursor: pointer; outline: none; - &:focus, &:hover { + &:focus, + &:hover { color: #fff; background-color: ${palette.red3}; } @@ -31,4 +36,4 @@ interface Props { onClick: (e?: any) => void; } -export default Item \ No newline at end of file +export default Item; diff --git a/src/components/contextMenu/Wrapper.tsx b/src/components/contextMenu/Wrapper.tsx index 71755e7..d538751 100644 --- a/src/components/contextMenu/Wrapper.tsx +++ b/src/components/contextMenu/Wrapper.tsx @@ -15,7 +15,7 @@ const Wrapper = styled.div` : `${y}px` }; width: ${({ width }) => width + 'px'}; - height: ${({ height }) => height + 'px'}; + height: ${({ height }) => 195 + 'px'}; box-sizing: border-box; padding: ${({ width }) => width > 0 ? `4px` diff --git a/src/containers/Header.tsx b/src/containers/Header.tsx index f13fca4..fc0c877 100644 --- a/src/containers/Header.tsx +++ b/src/containers/Header.tsx @@ -43,7 +43,15 @@ const Header = ({ alignItems: "center", }} > - + {title ? "|" : ""} diff --git a/src/containers/Reader.tsx b/src/containers/Reader.tsx index 1a9e101..ad4c5db 100644 --- a/src/containers/Reader.tsx +++ b/src/containers/Reader.tsx @@ -217,16 +217,6 @@ const Reader = ({ url, loadingView }: Props) => { const [isOpen, setIsOpen] = useState(false); const [color, setcolor] = useState("light-white"); - - // const Colors = [ - // { name: "dark-white", value: "#fff" }, - // { name: "dark-blue", value: "#fff" }, - // { name: "dark-brown", value: "#fff4e1" }, - // { name: "light-white", value: "#121212" }, - // { name: "light-brown", value: "#af622e" }, - // { name: "light-blue", value: "#5858df" }, - // ]; - const readyColors = [ { name: "dark-white", bgColor: "#4e4e4e", color: "#fff" }, { name: "light-white", bgColor: "#fff", color: "#292929" }, diff --git a/src/containers/commons/ContextMenu.tsx b/src/containers/commons/ContextMenu.tsx index d9f4110..f9ec1cd 100644 --- a/src/containers/commons/ContextMenu.tsx +++ b/src/containers/commons/ContextMenu.tsx @@ -43,7 +43,6 @@ const ContextMenu = ({ const ColorList = colorList.map((color) => ( {display && ( @@ -187,6 +188,32 @@ const ContextMenu = ({ isReverse={isReverse} ref={menuRef} > + +