Skip to content

Commit

Permalink
fix: copy expanded text
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jul 11, 2020
1 parent a090ffa commit 935bf64
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/elements/MultiCodeEditor/MultiCodeEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const ActionComponent = ({
setEditorLanguage,
editorLanguage,
editorLanguages,
code,
toCopy,
theme
}) => {
const background = theme === 'dark' ? colors.black : colors.white
Expand All @@ -127,7 +127,7 @@ const ActionComponent = ({
onChange={setEditorLanguage}
/>
</Text>
<CodeCopy theme={theme} interactive text={code} />
<CodeCopy theme={theme} interactive text={toCopy} />
</Actions>
)
}
Expand Down Expand Up @@ -155,13 +155,12 @@ const MultiCodeEditor = ({ theme, languages: codeByLanguage, ...props }) => {
<CodeEditor
language={toAlias(editorLanguage)}
children={code}
ActionComponent={() => (
ActionComponent={props => (
<ActionComponent
theme={theme}
setEditorLanguage={setEditorLanguage}
editorLanguage={editorLanguage}
editorLanguages={editorLanguages}
code={code}
{...props}
/>
)}
{...props}
Expand Down

0 comments on commit 935bf64

Please sign in to comment.