diff --git a/scss/core/_variables.scss b/scss/core/_variables.scss index 3fe1f20d29..c53894661e 100644 --- a/scss/core/_variables.scss +++ b/scss/core/_variables.scss @@ -282,7 +282,7 @@ $element-color-levels: map-merge( "border": 200, "icon": 300, "active-border": 300, - "focus": 300, + "focus": 500, "graphic": 300, "default": 500, "light-text": 500, diff --git a/src/Button/README.md b/src/Button/README.md index 93e235e375..88585c78dc 100644 --- a/src/Button/README.md +++ b/src/Button/README.md @@ -22,11 +22,11 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi return ( - - - - - + + + + + )} ``` @@ -43,11 +43,11 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi gap={2} direction={ isExtraSmall ? "vertical" : "horizontal" } > - - - - - + + + + + )} ``` @@ -65,20 +65,20 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi gap={2} direction={ isExtraSmall ? "vertical" : "horizontal" } > - - - - + + + + - - - - - + + + + + )} @@ -92,34 +92,41 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi return ( <> - - - - - - - - - - + + + + + + + + + + + + -)} + ) +} ``` ### When to use the inline size @@ -127,13 +134,11 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi Use inline size buttons for when a button sits with a line of text. ```jsx live -<> -

- 2 items selected. - - -

- +

+ 2 items selected. + + +

``` ## Block Buttons @@ -152,21 +157,41 @@ Use inline size buttons for when a button sits with a line of text. ### Disabled ```jsx live -<> - - - - +() => { + const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth }); + + return ( + + + + + + ) +} ``` ### With empty href For link to be `disabled`, it must have href defined with some value. ```jsx live -<> - - - +() => { + const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth }); + + return ( + + + + + ) +} ``` ### With Icons before or after @@ -181,23 +206,24 @@ For link to be `disabled`, it must have href defined with some value. gap={2} direction={ isExtraSmall ? "vertical" : "horizontal" } > - - - - - -)} + ) +} ``` ## Stateful buttons @@ -219,33 +245,63 @@ user-friendly experience. ### (Deprecated) color variants ```jsx live -
- Primary - Success - Danger - Light - Dark -
+() => { + const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.large.maxWidth }); + + return ( + + Primary + Success + Danger + Light + Dark + + ) +} ``` ### (Deprecated) outline variants ```jsx live -
- Primary - Success - Danger -
+() => { + const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth }); + + return ( + + Primary + Success + Danger + + ) +} ``` ### (Deprecated) inverse variants ```jsx live -
- Primary - Success - Danger -
+() => { + const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth }); + + return ( + + Primary + Success + Danger + + ) +} ``` ### (Deprecated) link variant diff --git a/src/Button/_variables.scss b/src/Button/_variables.scss index 5d92ed8271..5022877db9 100644 --- a/src/Button/_variables.scss +++ b/src/Button/_variables.scss @@ -19,7 +19,7 @@ $btn-border-width: $input-btn-border-width !default; $btn-font-weight: $font-weight-normal !default; $btn-box-shadow: inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default; $btn-focus-width: 2px !default; -$btn-focus-gap: 1px !default; +$btn-focus-gap: $btn-focus-width !default; $btn-focus-box-shadow: $input-btn-focus-box-shadow !default; $btn-disabled-opacity: .65 !default; $btn-active-box-shadow: none; @@ -48,3 +48,5 @@ $btn-focus-border-gap: $btn-focus-width + $btn-focus-gap !default; $btn-focus-distance-to-border: $btn-focus-border-gap + $btn-border-width !default; $btn-focus-border-radius: calc(#{$btn-border-radius} + #{$btn-focus-border-gap}) !default; +$btn-focus-border-radius-lg: $btn-focus-border-radius !default; +$btn-focus-border-radius-sm: $btn-border-radius !default; diff --git a/src/Button/index.scss b/src/Button/index.scss index 52c3eae069..9580fcd588 100644 --- a/src/Button/index.scss +++ b/src/Button/index.scss @@ -150,11 +150,11 @@ } &.btn-lg::before { - border-radius: $btn-focus-border-radius; + border-radius: $btn-focus-border-radius-lg; } &.btn-sm::before { - border-radius: $btn-focus-border-radius; + border-radius: $btn-focus-border-radius-sm; } &:active,