Skip to content

Commit

Permalink
fix(button-link): remove ButtonLink.modules.css
Browse files Browse the repository at this point in the history
To fix build error when using compose to include styles from a .scss file
  • Loading branch information
lzcabrera committed Aug 21, 2017
1 parent ee368bf commit 02ac933
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 62 deletions.
19 changes: 18 additions & 1 deletion src/components/Button/Button.modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ $text-color: $color-white;
box-shadow: 0 0 0 1px;
}

// FIXME: Used for ButtonLink.
// Tried to do composes: primary from '../../Button/Button.modules.scss'; but unsuccessful due to rollup config + CSS Modules complications.
@mixin visited($text-color) {
&:visited {
color: $text-color;
}
}

.button {
@include helvetica-neue-medium-65;

Expand Down Expand Up @@ -59,13 +67,14 @@ $text-color: $color-white;
}
}


.primary {
composes: button;

background-color: $primary-bg-color;
color: $text-color;

@include visited($text-color);

&:hover {
@include border;

Expand All @@ -80,6 +89,8 @@ $text-color: $color-white;
background-color: $secondary-bg-color;
color: $text-color;

@include visited($text-color);

&:hover {
@include border;

Expand All @@ -93,6 +104,8 @@ $text-color: $color-white;

color: $secondary-bg-color;

@include visited($secondary-bg-color);

&:hover {
background-color: $secondary-bg-color;
color: $text-color;
Expand All @@ -107,6 +120,8 @@ $text-color: $color-white;
background-color: transparent;
color: $text-color;

@include visited($text-color);

&:hover {
background-color: $text-color;
color: $secondary-bg-color;
Expand All @@ -120,6 +135,8 @@ $text-color: $color-white;

color: $secondary-bg-color;

@include visited($secondary-bg-color);

&:hover {
@include border;

Expand Down
2 changes: 1 addition & 1 deletion src/components/Link/ButtonLink/ButtonLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
import { warn } from '../../../warn'
import safeRest from '../../../safeRest'

import styles from './ButtonLink.modules.scss'
import styles from '../../Button/Button.modules.scss'

const getClassName = (variant, invert) => {
if (variant === 'primary' && invert) {
Expand Down
60 changes: 0 additions & 60 deletions src/components/Link/ButtonLink/ButtonLink.modules.scss

This file was deleted.

0 comments on commit 02ac933

Please sign in to comment.