Skip to content

Commit

Permalink
fix: feedback btn colors
Browse files Browse the repository at this point in the history
  • Loading branch information
jnm2377 committed Sep 16, 2020
1 parent 32d2523 commit d9f351a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
.button:focus {
outline: none;
border: 2px solid $focus;
box-shadow: inset 0 0 0 1px $inverse-01;
}

.button svg {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, { useState } from 'react';
import { FaceWink20, FaceWinkFilled20 } from '@carbon/icons-react';
import { FaceWink20 } from '@carbon/icons-react';

import LaunchButton from './LaunchButton';
import Form from './Form';
Expand All @@ -14,7 +14,6 @@ const FeedbackDialog = ({ onSubmit }) => {
<LaunchButton
visible={visible}
icon={FaceWink20}
filledIcon={FaceWinkFilled20}
onClick={() => setVisible(!visible)}
/>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ import React from 'react';
import cx from 'classnames';
import styles from './LaunchButton.module.scss';

function LaunchButton({
onClick,
visible,
icon: RegularIcon,
filledIcon: FilledIcon,
}) {
function LaunchButton({ onClick, visible, icon: RegularIcon }) {
const classNames = cx(styles.button, {
[styles.selected]: visible,
});
Expand All @@ -19,7 +14,7 @@ function LaunchButton({
className={classNames}
onClick={onClick}
aria-label="This launches a modal form to give website feedback.">
{visible ? <FilledIcon /> : <RegularIcon />}
<RegularIcon />
</button>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
height: $spacing-09;
border-radius: 50%;
border-color: transparent;
background: var(--cds-interactive-02);
background: $carbon--gray-30;
transition: all $duration--fast-02;
z-index: z('modal');
padding-top: 0.325rem;
Expand All @@ -15,20 +15,27 @@
right: $spacing-07;
}

.button:hover {
background: var(--cds-inverse-01); // gray-60 hover
}

.button.selected:hover {
background: var(--cds-interactive-02);
}

.button:focus {
outline: none;
border: 2px solid var(--cds-inverse-focus-ui);
box-shadow: inset 0 0 0 1px #fff;
box-shadow: inset 0 0 0 1px $inverse-01;
}

.button svg {
fill: var(--cds-icon-03);
fill: $carbon--black-100;
}

//unselected state hover + selected state (non-hover) #886
.button:hover,
.button.selected {
background: $inverse-01; // gray-60 hover
}

//selected state hover
.button.selected:hover {
background: var(--cds-interactive-02);
}

.button.selected:hover svg {
fill: $icon-03;
}

0 comments on commit d9f351a

Please sign in to comment.