Skip to content

Commit

Permalink
[@mantine/core] Switch: Fix incorrect alignment (#3082)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtivital committed Dec 12, 2022
1 parent 6dc8e99 commit f6636f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/mantine-core/src/Switch/Switch.story.tsx
Expand Up @@ -104,3 +104,7 @@ export function WithError() {
</Stack>
);
}

export function Alignment() {
return <Switch />;
}
7 changes: 4 additions & 3 deletions src/mantine-core/src/Switch/Switch.styles.ts
Expand Up @@ -60,13 +60,14 @@ export default createStyles(
return {
input: {
clip: 'rect(1px, 1px, 1px, 1px)',
height: '1px',
height: 0,
width: 0,
overflow: 'hidden',
width: '1px',
whiteSpace: 'nowrap',
padding: '0',
padding: 0,
WebkitClipPath: 'inset(50%)',
clipPath: 'inset(50%)',
position: 'absolute',
},

track: {
Expand Down

0 comments on commit f6636f1

Please sign in to comment.