Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhabib committed May 10, 2024
1 parent ec8bad4 commit 1b31838
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions src/Playroom/Toolbar/Toolbar.tsx
Expand Up @@ -169,8 +169,8 @@ export default ({ themes: allThemes, widths: allWidths, snippets }: Props) => {
onExited={() => setLastActivePanel(undefined)}
>
<div className={styles.panel} id="custom-id">
{lastActivePanel === 'snippets' && (
<div className={styles.preference}>
<div className={styles.preference}>
{lastActivePanel === 'snippets' && (
<Snippets
snippets={snippets}
onHighlight={(snippet) => {
Expand All @@ -190,32 +190,24 @@ export default ({ themes: allThemes, widths: allWidths, snippets }: Props) => {
}
}}
/>
</div>
)}
)}

{lastActivePanel === 'frames' && (
<div className={styles.preference}>
{lastActivePanel === 'frames' && (
<FramesPanel
availableWidths={allWidths}
availableThemes={allThemes}
/>
</div>
)}
)}

{lastActivePanel === 'preview' && (
<div className={styles.preference}>
{lastActivePanel === 'preview' && (
<PreviewPanel
themes={allThemes}
visibleThemes={visibleThemes}
/>
</div>
)}
)}

{lastActivePanel === 'settings' && (
<div className={styles.preference}>
<SettingsPanel />
</div>
)}
{lastActivePanel === 'settings' && <SettingsPanel />}
</div>
</div>
</CSSTransition>
</div>
Expand Down

0 comments on commit 1b31838

Please sign in to comment.