fix(core): hairline boarders for divider (#8021)

This commit is contained in:
pengx17 2024-08-30 02:31:28 +00:00
parent f544e69d02
commit 4ff6fbd052
No known key found for this signature in database
GPG Key ID: 23F23D9E8B3971ED
2 changed files with 9 additions and 14 deletions

View File

@ -31,10 +31,7 @@ export const Divider = forwardRef<HTMLDivElement, DividerProps>(
styles.divider,
{
[styles.verticalDivider]: orientation === 'vertical',
[styles.thinner]:
size === 'thinner' && orientation === 'horizontal',
[styles.verticalThinner]:
size === 'thinner' && orientation === 'vertical',
[styles.thinner]: size === 'thinner',
},
className
)}

View File

@ -1,21 +1,19 @@
import { cssVar } from '@toeverything/theme';
import { style } from '@vanilla-extract/css';
export const divider = style({
height: '1px',
backgroundColor: cssVar('borderColor'),
borderRadius: '8px',
borderBottom: `1px solid ${cssVar('borderColor')}`,
height: 0,
margin: '8px 0',
width: '100%',
});
export const thinner = style({
height: '0.5px',
});
export const verticalDivider = style({
width: '1px',
borderRadius: '8px',
borderLeft: `1px solid ${cssVar('borderColor')}`,
width: 0,
height: '100%',
margin: '0 2px',
});
export const verticalThinner = style({
width: '0.5px',
export const thinner = style({
borderWidth: '0.5px',
});