mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
updated responsive props for border radius (#16510)
* updated responsive props for border radius * updated responsive prop * added responsive border radius story * fixed box structure in story * fixed console issue * updated display constants * updated constants
This commit is contained in:
parent
e11203c2cd
commit
ad4db57a4a
@ -128,64 +128,19 @@ $attributesToApplyExtraProperties: margin;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// border-radius
|
||||||
&--rounded-none {
|
@each $radius, $value in design-system.$border-radius {
|
||||||
border-radius: 0;
|
&--rounded-#{$radius} {
|
||||||
|
border-radius: $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--rounded-xs {
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--rounded-sm {
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--rounded-md {
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--rounded-lg {
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--rounded-xl {
|
|
||||||
border-radius: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--rounded-pill {
|
|
||||||
border-radius: 9999px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--rounded-full {
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
// breakpoint classes
|
// breakpoint classes
|
||||||
@each $breakpoint, $min-width in $screen-sizes-map {
|
@each $breakpoint, $min-width in $screen-sizes-map {
|
||||||
@media screen and (min-width: $min-width) {
|
@each $radius, $value in design-system.$border-radius {
|
||||||
&--#{$breakpoint}\:rounded-none {
|
@media screen and (min-width: $min-width) {
|
||||||
border-radius: 0;
|
&--#{$breakpoint}\:rounded-#{$radius} {
|
||||||
}
|
border-radius: $value;
|
||||||
|
}
|
||||||
&--#{$breakpoint}\:rounded-xs {
|
|
||||||
border-radius: 0.125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--#{$breakpoint}\:rounded-sm {
|
|
||||||
border-radius: 0.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--#{$breakpoint}\:rounded-md {
|
|
||||||
border-radius: 0.375rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--#{$breakpoint}\:rounded-lg {
|
|
||||||
border-radius: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--#{$breakpoint}\:rounded-xl {
|
|
||||||
border-radius: 0.75rem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -582,8 +582,12 @@ export const ResponsiveProps = () => {
|
|||||||
marginBottom={[0]}
|
marginBottom={[0]}
|
||||||
padding={[2, 4]}
|
padding={[2, 4]}
|
||||||
gap={[2, 4]}
|
gap={[2, 4]}
|
||||||
display={['flex', null, null, 'none']}
|
display={[DISPLAY.FLEX, null, null, DISPLAY.NONE]}
|
||||||
flexDirection={['column', 'row']}
|
flexDirection={[
|
||||||
|
FLEX_DIRECTION.COLUMN,
|
||||||
|
FLEX_DIRECTION.COLUMN,
|
||||||
|
FLEX_DIRECTION.ROW,
|
||||||
|
]}
|
||||||
borderColor={COLORS.BORDER_DEFAULT}
|
borderColor={COLORS.BORDER_DEFAULT}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
@ -607,6 +611,32 @@ export const ResponsiveProps = () => {
|
|||||||
>
|
>
|
||||||
example
|
example
|
||||||
</Box>
|
</Box>
|
||||||
|
<Box
|
||||||
|
padding={[4, 8]}
|
||||||
|
borderRadius={[
|
||||||
|
BORDER_RADIUS.XS,
|
||||||
|
BORDER_RADIUS.SM,
|
||||||
|
BORDER_RADIUS.MD,
|
||||||
|
BORDER_RADIUS.LG,
|
||||||
|
]}
|
||||||
|
backgroundColor={COLORS.BACKGROUND_ALTERNATIVE}
|
||||||
|
borderColor={COLORS.BORDER_MUTED}
|
||||||
|
>
|
||||||
|
Responsive Border Radius 1
|
||||||
|
</Box>
|
||||||
|
<Box
|
||||||
|
padding={[4, 8]}
|
||||||
|
borderRadius={[
|
||||||
|
BORDER_RADIUS.XL,
|
||||||
|
BORDER_RADIUS.PILL,
|
||||||
|
BORDER_RADIUS.NONE,
|
||||||
|
BORDER_RADIUS.FULL,
|
||||||
|
]}
|
||||||
|
backgroundColor={COLORS.BACKGROUND_ALTERNATIVE}
|
||||||
|
borderColor={COLORS.BORDER_MUTED}
|
||||||
|
>
|
||||||
|
Responsive Border Radius 2
|
||||||
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -48,6 +48,15 @@ $overflow-wrap: normal, break-word;
|
|||||||
$font-weight: bold, medium, normal, 100, 200, 300, 400, 500, 600, 700, 800, 900;
|
$font-weight: bold, medium, normal, 100, 200, 300, 400, 500, 600, 700, 800, 900;
|
||||||
$font-style: normal, italic, oblique;
|
$font-style: normal, italic, oblique;
|
||||||
$font-size: 10px, 12px;
|
$font-size: 10px, 12px;
|
||||||
|
$border-radius: (
|
||||||
|
xs: 2px,
|
||||||
|
md: 4px,
|
||||||
|
lg: 8px,
|
||||||
|
xl: 12px,
|
||||||
|
full: 50%,
|
||||||
|
pill: 9999px,
|
||||||
|
none: 0,
|
||||||
|
);
|
||||||
|
|
||||||
// textarea
|
// textarea
|
||||||
$resize: none, both, horizontal, vertical, initial, inherit;
|
$resize: none, both, horizontal, vertical, initial, inherit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user