parent
802d8d8c08
commit
eb0dc1fdf2
25 changed files with 158 additions and 202 deletions
After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 4.9 KiB |
@ -1,34 +0,0 @@ |
||||
import styled from 'styled-components' |
||||
// lib
|
||||
import * as styles from 'lib/styles/styles' |
||||
import palette from 'lib/styles/palette' |
||||
|
||||
const SortedBtn = ({ text, isSelected, onClick }: Props) => {
|
||||
return <Btn isSelected={isSelected} onClick={onClick}>{text}</Btn>; |
||||
} |
||||
|
||||
const Btn = styled.button<{isSelected: boolean}>` |
||||
height: 20px; |
||||
line-height: 20px; |
||||
font-size: 14px; |
||||
cursor: pointer; |
||||
text-align: center; |
||||
margin-left: 16px; |
||||
color: ${({isSelected}) => isSelected
|
||||
? palette.blue3 |
||||
: palette.gray4 |
||||
}; |
||||
transition: .2s ${styles.transition}; |
||||
|
||||
&:hover { |
||||
color: ${palette.blue3}; |
||||
} |
||||
`;
|
||||
|
||||
interface Props { |
||||
text: string; |
||||
isSelected: boolean; |
||||
onClick: () => void; |
||||
} |
||||
|
||||
export default SortedBtn |
@ -1,10 +0,0 @@ |
||||
import styled from 'styled-components' |
||||
|
||||
const SortedBtnWrapper = styled.div` |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: flex-end; |
||||
padding: 0 24px 24px 24px; |
||||
`;
|
||||
|
||||
export default SortedBtnWrapper |
@ -0,0 +1,29 @@ |
||||
import styled from 'styled-components' |
||||
// components
|
||||
import OptionWrapper from 'components/option/OptionWrapper' |
||||
import OptionTitle from 'components/option/OptionTitle' |
||||
|
||||
const ControlIconBtnWrapper = ({ title, children }: Props) => { |
||||
return ( |
||||
<OptionWrapper> |
||||
<OptionTitle>{title}</OptionTitle> |
||||
<BtnWrapper> |
||||
{children} |
||||
</BtnWrapper> |
||||
</OptionWrapper> |
||||
); |
||||
} |
||||
|
||||
const BtnWrapper = styled.div` |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-around; |
||||
padding: 8px 0; |
||||
`;
|
||||
|
||||
interface Props { |
||||
title: string; |
||||
children: any[] |
||||
} |
||||
|
||||
export default ControlIconBtnWrapper |
@ -1,6 +1,6 @@ |
||||
import ReactDOM from 'react-dom'; |
||||
import Reader from 'containers/Reader' |
||||
|
||||
const EPUB_URL = "react-epub-viewer/files/Alices Adventures in Wonderland.epub"; |
||||
const EPUB_URL = "/files/Alices Adventures in Wonderland.epub"; |
||||
|
||||
ReactDOM.render(<Reader url={EPUB_URL} />, document.getElementById('root')); |
Loading…
Reference in new issue