diff --git a/TODO.md b/TODO.md index a8a9b73..9180373 100644 --- a/TODO.md +++ b/TODO.md @@ -1,10 +1,10 @@ # TODO - [ ] Add redux -- [ ] Prevent reducing talent points on a talent that is a requirement for another talent with points in it - [ ] Talent tooltips - [ ] Generate URL for chosen talents - [ ] Responsive on mobile - [ ] Pretty ClassPicker - [x] Add react-router -- [x] Prevent reducing talent points on a row when it is a dependency for points already spent in the next row \ No newline at end of file +- [x] Prevent reducing talent points on a row when it is a dependency for points already spent in the next row +- [x] Prevent reducing talent points on a talent that is a requirement for another talent with points in it diff --git a/src/App.scss b/src/App.scss index d48cb51..55eba5e 100644 --- a/src/App.scss +++ b/src/App.scss @@ -3,7 +3,6 @@ body { } .calculator { - &__points { color: white; text-align: center; @@ -40,15 +39,26 @@ body { .class-picker { display: flex; + justify-content: center; &__class { margin-right: 2em; - } + opacity: .8; - // TODO: Make BEM - a { - &.active { - font-weight: bold; + &:hover { + opacity: 1; + } + + &--active { + opacity: 1; + } + + &--inactive { + opacity: .4; + + &:hover { + opacity: .6; + } } } } \ No newline at end of file diff --git a/src/components/ClassPicker.tsx b/src/components/ClassPicker.tsx index 374e451..0bc3b57 100644 --- a/src/components/ClassPicker.tsx +++ b/src/components/ClassPicker.tsx @@ -1,18 +1,39 @@ import React from 'react' -import { NavLink } from 'react-router-dom' +import { NavLink, Link } from 'react-router-dom' import { classByName } from '../data/classes' +import { Icon } from './Icon' +import classNames from 'classnames' interface Props { + /** Name of the selected class, lowercase */ + selected?: string } -export const ClassPicker: React.FC = () => { - return ( -