Skip to content

Commit

Permalink
refactor: fix typo in variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrTopi committed Feb 2, 2024
1 parent 506fcb7 commit 30bcbb0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/__docs__/src/Playground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class Playground extends Component<PlaygroundProps, PlaygroundState> {
}
}

mutliExample = () => typeof this.props.code !== 'string'
multiExample = () => typeof this.props.code !== 'string'

handleCodeToggle = () => {
this.setState({
Expand All @@ -131,7 +131,7 @@ class Playground extends Component<PlaygroundProps, PlaygroundState> {

handleChange = (newCode: string) => {
let code: string | [string, string] = newCode
if (this.mutliExample()) {
if (this.multiExample()) {
const codeArr = [...this.state.code] as [string, string]
codeArr[this.state.selectedTab] = newCode
code = codeArr
Expand All @@ -151,7 +151,7 @@ class Playground extends Component<PlaygroundProps, PlaygroundState> {
renderEditor() {
const { styles, title, readOnly } = this.props
const { selectedTab } = this.state
const code = this.mutliExample()
const code = this.multiExample()
? this.state.code[selectedTab]
: this.state.code
return (
Expand Down Expand Up @@ -274,7 +274,7 @@ class Playground extends Component<PlaygroundProps, PlaygroundState> {
onClick={this.handleMinimize}
screenReaderLabel="Close"
/>
{this.mutliExample()
{this.multiExample()
? this.renderTabPanel(themeKey, themes)
: this.renderPreview(
this.state.code as string,
Expand All @@ -283,7 +283,7 @@ class Playground extends Component<PlaygroundProps, PlaygroundState> {
)}
</Modal.Body>
</Modal>
) : this.mutliExample() ? (
) : this.multiExample() ? (
this.renderTabPanel(themeKey, themes)
) : (
this.renderPreview(this.state.code as string, themeKey, themes)
Expand Down Expand Up @@ -339,7 +339,7 @@ class Playground extends Component<PlaygroundProps, PlaygroundState> {
<Flex.Item>
<CodeSandboxButton
code={
this.mutliExample()
this.multiExample()
? this.state.code[this.state.selectedTab]
: (this.state.code as string)
}
Expand Down

0 comments on commit 30bcbb0

Please sign in to comment.