Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhabib committed Jun 3, 2024
1 parent b39d8a4 commit 9234c14
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/Playroom/FramesPanel/FramesPanel.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import { calc } from '@vanilla-extract/css-utils';
import { globalStyle, style } from '@vanilla-extract/css';
import { colorPaletteVars, sprinkles, vars } from '../sprinkles.css';

export const title = sprinkles({
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
export const title = style({
marginRight: 'auto',
});

export const reset = style([
Expand Down
8 changes: 5 additions & 3 deletions src/Playroom/FramesPanel/FramesPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ interface FrameHeadingProps {
children: ReactNode;
}
const FrameHeading = ({ showReset, onReset, children }: FrameHeadingProps) => (
<div className={styles.title}>
<Heading level="3">{children}</Heading>
<Inline space="none" alignY="center">
<div className={styles.title}>
<Heading level="3">{children}</Heading>
</div>
{showReset && <ResetButton onClick={onReset}>Clear</ResetButton>}
</div>
</Inline>
);

interface FrameOptionProps<Option> {
Expand Down
2 changes: 1 addition & 1 deletion src/Playroom/SettingsPanel/SettingsPanel.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const keyboardShortcutsRow = sprinkles({
});

export const keyboardShortcutTitle = style({
flex: 1,
marginRight: 'auto',
});

export const keyboardShortcutKeys = style([
Expand Down

0 comments on commit 9234c14

Please sign in to comment.