feat: Improve star/unstarred iconography

This commit is contained in:
Tom Moor
2021-01-31 20:53:27 -08:00
parent 654fdf1c7e
commit 7066a45323
3 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,5 @@
// @flow
import { StarredIcon } from "outline-icons";
import { StarredIcon, UnstarredIcon } from "outline-icons";
import * as React from "react";
import { useTranslation } from "react-i18next";
import styled from "styled-components";
@ -38,11 +38,11 @@ function Star({ size, document, ...rest }: Props) {
aria-label={document.isStarred ? t("Unstar") : t("Star")}
{...rest}
>
<AnimatedStar
solid={document.isStarred}
size={size}
color="currentColor"
/>
{document.isStarred ? (
<AnimatedStar size={size} color="currentColor" />
) : (
<AnimatedStar size={size} color="currentColor" as={UnstarredIcon} />
)}
</Button>
);
}

View File

@ -127,7 +127,7 @@
"mobx-react": "^6.2.5",
"natural-sort": "^1.0.0",
"nodemailer": "^4.4.0",
"outline-icons": "^1.23.0",
"outline-icons": "^1.24.0",
"oy-vey": "^0.10.0",
"pg": "^8.5.1",
"pg-hstore": "^2.3.3",

View File

@ -8946,10 +8946,10 @@ os-tmpdir@~1.0.2:
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
outline-icons@^1.23.0:
version "1.23.0"
resolved "https://registry.yarnpkg.com/outline-icons/-/outline-icons-1.23.0.tgz#46c9655f7f7f77900349ca39d4676dd99550e3ea"
integrity sha512-p4QZ1KIOnkB3qju1+NNJxQPsmVOibqOBp7AksFas7Igchg94plR/fnDbs9Oe2uBzD64PApR4ypU/pe6mkMGong==
outline-icons@^1.23.0, outline-icons@^1.24.0:
version "1.24.0"
resolved "https://registry.yarnpkg.com/outline-icons/-/outline-icons-1.24.0.tgz#d66c3fe036dec4440ef442c0a75ac0ace7fa09ec"
integrity sha512-B+3f4rKHTr70OVUcfY6G7wtBRDppq1/X2hmraF0Qa+/c8nbi8U+W0xj6wj1Sm2lgrPgiOot77lxBIsKEemGgRQ==
oy-vey@^0.10.0:
version "0.10.0"