diff --git a/components/Button/index.scss b/components/Button/index.scss index 38318047..0d2f83c1 100644 --- a/components/Button/index.scss +++ b/components/Button/index.scss @@ -29,11 +29,46 @@ background: transparent; } + &.Contained { + background: var(--button-contained-bg); + + &:hover { + background: var(--button-contained-bg-hover); + } + + &.Save:hover .Accessory svg { + fill: #ff4d4d; + stroke: #ff4d4d; + } + + &.Active.Save { + color: #ff4d4d; + + .Accessory svg { + fill: #ff4d4d; + stroke: #ff4d4d; + } + + &:hover { + color: darken(#ff4d4d, 30); + + .Accessory svg { + fill: darken(#ff4d4d, 30); + stroke: darken(#ff4d4d, 30); + } + } + } + } + &.medium { height: $unit * 5.5; padding: ($unit * 1.5) $unit-2x; } + &.small { + padding: $unit * 1.5; + } + &.destructive:hover { background: $error; color: $grey-100; @@ -55,11 +90,6 @@ &.save.Active { color: #ff4d4d; - .Accessory svg { - fill: #ff4d4d; - stroke: #ff4d4d; - } - &:hover { color: darken(#ff4d4d, 30); diff --git a/components/Button/index.tsx b/components/Button/index.tsx index d09c53b9..2f48de7f 100644 --- a/components/Button/index.tsx +++ b/components/Button/index.tsx @@ -23,23 +23,31 @@ interface Props HTMLButtonElement > { accessoryIcon?: React.ReactNode + active?: boolean blended?: boolean + contained?: boolean size?: 'small' | 'medium' | 'large' text?: string } const defaultProps = { + active: false, blended: false, + contained: false, size: 'medium', } const Button = React.forwardRef( - ({ accessoryIcon, blended, size, text, ...props }, forwardedRef) => { + ( + { accessoryIcon, active, blended, contained, size, text, ...props }, + forwardedRef + ) => { const classes = classNames( { Button: true, + Active: active, Blended: blended, - // Active: active, + Contained: contained, // 'btn-pressed': pressed, // 'btn-disabled': disabled, // save: props.icon === 'save', diff --git a/components/GridRep/index.scss b/components/GridRep/index.scss index 1905d603..c7d4d60b 100644 --- a/components/GridRep/index.scss +++ b/components/GridRep/index.scss @@ -94,11 +94,6 @@ width: 14px; height: 14px; } - - button:hover, - button.Active { - background: $grey-90; - } } .bottom { diff --git a/components/GridRep/index.tsx b/components/GridRep/index.tsx index eee3729c..56b00f1a 100644 --- a/components/GridRep/index.tsx +++ b/components/GridRep/index.tsx @@ -8,7 +8,8 @@ import { accountState } from '~utils/accountState' import { formatTimeAgo } from '~utils/timeAgo' import Button from '~components/Button' -import { ButtonType } from '~utils/enums' + +import SaveIcon from '~public/icons/Save.svg' import './index.scss' @@ -162,9 +163,11 @@ const GridRep = (props: Props) => { ((props.user && account.user && account.user.id !== props.user.id) || !props.user) ? (