Skip to content

Commit

Permalink
Fix centering of settings panel and toolbar icons (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
askoufis authored May 22, 2024
1 parent 934a017 commit 92a0039
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-zoos-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'playroom': patch
---

Fix Playroom UI icon centering
6 changes: 0 additions & 6 deletions src/Playroom/SettingsPanel/SettingsPanel.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ export const realRadio = style([
},
]);

export const labelText = sprinkles({
display: 'block',
position: 'relative',
zIndex: 1,
});

export const label = style([
sprinkles({
position: 'relative',
Expand Down
8 changes: 2 additions & 6 deletions src/Playroom/SettingsPanel/SettingsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ export default React.memo(() => {
className={styles.label}
title={option}
>
<span className={styles.labelText}>
{positionIcon[option.toLowerCase() as EditorPosition]}
</span>
{positionIcon[option.toLowerCase() as EditorPosition]}
</label>
</div>
))}
Expand Down Expand Up @@ -155,9 +153,7 @@ export default React.memo(() => {
className={styles.label}
title={option}
>
<span className={styles.labelText}>
{colorModeIcon[option.toLowerCase() as ColorScheme]}
</span>
{colorModeIcon[option.toLowerCase() as ColorScheme]}
</label>
</div>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/Playroom/ToolbarItem/ToolbarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default ({
onClick();
}}
>
<span style={{ display: 'block', position: 'relative' }}>{children}</span>
{children}
<span
className={classnames(styles.indicator, {
[styles.show]: showIndicator && !success,
Expand Down

0 comments on commit 92a0039

Please sign in to comment.