Skip to content

Commit

Permalink
style: fragment key
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed May 9, 2024
1 parent 1ea9545 commit d0257be
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions src/multi/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -900,21 +900,29 @@ const MultiPrivateEditorComp = React.forwardRef<
<StatusBar
title={title}
rightActions={[
ideConfig.disablePrettier ? null : (
<Prettier
onClick={handleFromat}
className="music-monaco-editor-prettier"
/>
),
ideConfig.disableSetting ? null : (
<Setting
disablePrettier={ideConfig.disablePrettier}
defaultTheme={defaultTheme}
getTarget={() => rootRef.current}
autoPrettier={autoPrettierRef.current}
onAutoPrettierChange={handleSetAutoPrettier}
/>
),
<React.Fragment key="prettier">
{
ideConfig.disablePrettier ? null : (
<Prettier
onClick={handleFromat}
className="music-monaco-editor-prettier"
/>
)
}
</React.Fragment>,
<React.Fragment key="setting">
{
ideConfig.disableSetting ? null : (
<Setting
disablePrettier={ideConfig.disablePrettier}
defaultTheme={defaultTheme}
getTarget={() => rootRef.current}
autoPrettier={autoPrettierRef.current}
onAutoPrettierChange={handleSetAutoPrettier}
/>
)
}
</React.Fragment>,
]}
/>
</div>
Expand Down

0 comments on commit d0257be

Please sign in to comment.