Skip to content

Commit

Permalink
Update fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
planktonic committed May 17, 2023
1 parent 67c7411 commit 0b5923a
Show file tree
Hide file tree
Showing 5 changed files with 1,773 additions and 777 deletions.
4 changes: 2 additions & 2 deletions .storybook/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ function capitalizeFirstLetter(string) {

export const generateLabel = (items) => capitalizeFirstLetter(items.join(' '));

export const generateButtonLabel = ({
export const generateButtonLabel = (
shapeVariant = [],
colorVariant = [],
disabled = false,
pressed = false,
}) =>
) =>
capitalizeFirstLetter(
[
shapeVariant.length === 0 ? 'default' : shapeVariant.join(' '),
Expand Down
4 changes: 2 additions & 2 deletions scss/bitstyles/atoms/button/Button.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { generateLabel } from '../../../../.storybook/helpers';
import { generateButtonLabel } from '../../../../.storybook/helpers';

export default ({
children,
Expand All @@ -16,7 +16,7 @@ export default ({
const button = document.createElement(element);
button.innerHTML =
children ||
generateLabel(
generateButtonLabel(
shapeVariant,
colorVariant,
disabled || ariaDisabled,
Expand Down
10 changes: 10 additions & 0 deletions scss/bitstyles/atoms/button/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@
text-decoration: none;
}

&:active {
z-index: 1;
border-color: var(#{custom-property.get($items: ('button', 'active', 'border-color'))});
outline-width: 0;
background-color: var(#{custom-property.get($items: ('button', 'active', 'background-color'))});
box-shadow: var(#{custom-property.get($items: ('button', 'active', 'box-shadow'))});
color: var(#{custom-property.get($items: ('button', 'active', 'color'))});
text-decoration: none;
}

&:focus-visible {
z-index: 3;
outline: settings.$outline-color solid settings.$outline-width;
Expand Down
Loading

0 comments on commit 0b5923a

Please sign in to comment.