Skip to content

Commit

Permalink
Fix typos on the source code
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelsaback committed Sep 4, 2020
1 parent 3d38779 commit 8934c05
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions src/modules/ReactReader/ReactReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ class ReactReader extends PureComponent {
super(props);
this.readerRef = React.createRef();
this.state = {
expanedToc: false,
expandedToc: false,
toc: false
};
}
toggleToc = () => {
this.setState({
expanedToc: !this.state.expanedToc
expandedToc: !this.state.expandedToc
});
};

Expand All @@ -61,7 +61,7 @@ class ReactReader extends PureComponent {
};

renderToc() {
const { toc, expanedToc } = this.state;
const { toc, expandedToc } = this.state;
const { styles } = this.props;
return (
<div>
Expand All @@ -77,7 +77,7 @@ class ReactReader extends PureComponent {
))}
</div>
</div>
{expanedToc && (
{expandedToc && (
<div style={styles.tocBackground} onClick={this.toggleToc} />
)}
</div>
Expand All @@ -88,21 +88,21 @@ class ReactReader extends PureComponent {
const { locationChanged } = this.props;
this.setState(
{
expanedToc: false
expandedToc: false
},
() => locationChanged && locationChanged(loc)
);
};

renderTocToggle() {
const { expanedToc } = this.state;
const { expandedToc } = this.state;
const { styles } = this.props;
return (
<button
style={Object.assign(
{},
styles.tocButton,
expanedToc ? styles.tocButtonExpaned : {}
expandedToc ? styles.tocButtonExpanded : {}
)}
onClick={this.toggleToc}
>
Expand All @@ -126,14 +126,14 @@ class ReactReader extends PureComponent {
swipeable,
...props
} = this.props;
const { toc, expanedToc } = this.state;
const { toc, expandedToc } = this.state;
return (
<div style={styles.container}>
<div
style={Object.assign(
{},
styles.readerArea,
expanedToc ? styles.containerExpaned : {}
expandedToc ? styles.containerExpanded : {}
)}
>
{showToc && this.renderTocToggle()}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/ReactReader/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
backgroundColor: "#fff",
transition: "all .3s ease"
},
containerExpaned: {
containerExpanded: {
transform: "translateX(256px)"
},
titleArea: {
Expand Down Expand Up @@ -110,7 +110,7 @@ export default {
borderRadius: 2,
outline: "none"
},
tocButtonExpaned: {
tocButtonExpanded: {
background: "#f2f2f2"
},
tocButtonBar: {
Expand Down
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ declare class ReactReader extends React.Component<ReactReaderProps> {}
interface ReactReaderStyles {
container: CSS.Properties;
readerArea: CSS.Properties;
containerExpaned: CSS.Properties;
containerExpanded: CSS.Properties;
titleArea: CSS.Properties;
reader: CSS.Properties;
swipeWrapper: CSS.Properties;
Expand All @@ -53,7 +53,7 @@ interface ReactReaderStyles {
tocArea: CSS.Properties;
tocAreaButton: CSS.Properties;
tocButton: CSS.Properties;
tocButtonExpaned: CSS.Properties;
tocButtonExpanded: CSS.Properties;
tocButtonBar: CSS.Properties;
tocButtonBarTop: CSS.Properties;
tocButtonBarBottom: CSS.Properties;
Expand Down

0 comments on commit 8934c05

Please sign in to comment.