Skip to content

Commit

Permalink
feat: 🎸 improve presentation of view mode switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jul 21, 2024
1 parent 8d9e013 commit 3eea005
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/FocusRegion/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const toolbarClass = rule({
d: 'inline-block',
pos: 'absolute',
top: '-11px',
l: 'calc(100% - 16px)',
l: 'calc(100% - 24px)',
});

export interface FocusRegionProps {
Expand Down
18 changes: 2 additions & 16 deletions src/buttons/Action/SwitchAction.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import {drule, useTheme} from 'nano-theme';
import {drule} from 'nano-theme';
import * as css from '../../css';
import {Action, ActionProps} from '.';

Expand All @@ -13,24 +13,10 @@ const blockClass = drule({
});

export const SwitchAction: React.FC<Omit<ActionProps, 'children' | 'className'>> = (props) => {
const theme = useTheme();

return (
<Action
{...props}
className={blockClass({
'&:hover': {
bg: css.negative,
bd: `1px solid ${css.negative}`,
svg: {
fill: '#fff',
},
},
'&:active': {
bg: theme.g(0.1),
bd: `1px solid ${theme.g(0.1)}`,
},
})}
className={blockClass()}
>
{'~'}
</Action>
Expand Down

0 comments on commit 3eea005

Please sign in to comment.