Skip to content

Commit

Permalink
Merge pull request #120 from ApeSwapFinance/feat/fix-lpTag
Browse files Browse the repository at this point in the history
chore: Fixed LpTag
  • Loading branch information
ape-fede authored Dec 15, 2022
2 parents 0f28e50 + f7e148d commit 21bd5e0
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 105 deletions.
100 changes: 50 additions & 50 deletions src/__tests__/widgets/menu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ it("renders correctly", () => {
expect(asFragment()).toMatchInlineSnapshot(`
<DocumentFragment>
<div
class="sc-jcVcSv iFIlhf"
class="sc-citxvW iRpojR"
>
<nav
class="sc-iUuxjF drpIUF"
class="sc-bZSRNg fYLsjM"
>
<div
class="css-4cffwv"
Expand Down Expand Up @@ -200,38 +200,38 @@ it("renders correctly", () => {
</div>
</nav>
<div
class="sc-iBaQBe idhelT"
class="sc-iUuxjF jtvsWi"
>
<div
class="sc-gWHigU fKCtSb"
class="sc-hiSbEG jRExDC"
>
<div
class="sc-ezredP hVSuvJ"
class="sc-giImIA hxJRXv"
role="button"
>
<a
href="/swap"
target="_self"
>
<div
class="sc-giImIA bUFezZ"
class="sc-iJuVqt iTOioi"
>
Exchange
</div>
</a>
</div>
<div
class="sc-kLgnNl khAKMs"
class="sc-bYEvvW jlsOQN"
>
<div
class="sc-ezredP hVSuvJ"
class="sc-giImIA hxJRXv"
role="button"
>
<div
class="sc-jJEKmz eNAolY"
class="sc-iktFfs cDLrHU"
>
<div
class="sc-giImIA bUFezZ"
class="sc-iJuVqt iTOioi"
>
Stake
</div>
Expand All @@ -249,21 +249,21 @@ it("renders correctly", () => {
</svg>
</div>
<div
class="sc-iktFfs lgOqlH"
class="sc-kLgnNl btEQLW"
/>
</div>
<div
class="sc-kLgnNl khAKMs"
class="sc-bYEvvW jlsOQN"
>
<div
class="sc-ezredP hVSuvJ"
class="sc-giImIA hxJRXv"
role="button"
>
<div
class="sc-jJEKmz eNAolY"
class="sc-iktFfs cDLrHU"
>
<div
class="sc-giImIA bUFezZ"
class="sc-iJuVqt iTOioi"
>
Raise
</div>
Expand All @@ -281,21 +281,21 @@ it("renders correctly", () => {
</svg>
</div>
<div
class="sc-iktFfs lgOqlH"
class="sc-kLgnNl btEQLW"
/>
</div>
<div
class="sc-kLgnNl khAKMs"
class="sc-bYEvvW jlsOQN"
>
<div
class="sc-ezredP hVSuvJ"
class="sc-giImIA hxJRXv"
role="button"
>
<div
class="sc-jJEKmz eNAolY"
class="sc-iktFfs cDLrHU"
>
<div
class="sc-giImIA bUFezZ"
class="sc-iJuVqt iTOioi"
>
Collect
</div>
Expand All @@ -313,36 +313,36 @@ it("renders correctly", () => {
</svg>
</div>
<div
class="sc-iktFfs lgOqlH"
class="sc-kLgnNl btEQLW"
/>
</div>
<div
class="sc-ezredP hVSuvJ"
class="sc-giImIA hxJRXv"
role="button"
>
<a
href="https://app.ola.finance/apeswap/markets"
target="_blank"
>
<div
class="sc-giImIA bUFezZ"
class="sc-iJuVqt iTOioi"
>
Lend
</div>
</a>
</div>
<div
class="sc-kLgnNl khAKMs"
class="sc-bYEvvW jlsOQN"
>
<div
class="sc-ezredP hVSuvJ"
class="sc-giImIA hxJRXv"
role="button"
>
<div
class="sc-jJEKmz eNAolY"
class="sc-iktFfs cDLrHU"
>
<div
class="sc-giImIA bUFezZ"
class="sc-iJuVqt iTOioi"
>
Explore
</div>
Expand All @@ -360,7 +360,7 @@ it("renders correctly", () => {
</svg>
</div>
<div
class="sc-iktFfs lgOqlH"
class="sc-kLgnNl btEQLW"
/>
</div>
<div
Expand All @@ -373,7 +373,7 @@ it("renders correctly", () => {
style="display: flex; align-items: center; justify-content: space-evenly; width: 200px;"
>
<a
class="sc-hiSbEG gqZtKj"
class="sc-jJEKmz dMlzxM"
href="https://twitter.com/ape_swap"
rel="noopener noreferrer"
target="_blank"
Expand All @@ -399,7 +399,7 @@ it("renders correctly", () => {
</svg>
</a>
<a
class="sc-hiSbEG gqZtKj"
class="sc-jJEKmz dMlzxM"
href="https://t.me/ape_swap"
rel="noopener noreferrer"
target="_blank"
Expand All @@ -425,7 +425,7 @@ it("renders correctly", () => {
</svg>
</a>
<a
class="sc-hiSbEG gqZtKj"
class="sc-jJEKmz dMlzxM"
href="https://apeswap.click/discord"
rel="noopener noreferrer"
target="_blank"
Expand Down Expand Up @@ -548,12 +548,12 @@ it("renders correctly", () => {
</div>
</div>
<div
class="sc-eggMyH dwaMaH"
class="sc-iBaQBe eWDVUC"
>
body
</div>
<div
class="sc-bdfBQB sc-cTkxnA fhltBt WiFmI"
class="sc-bdfBQB sc-eggMyH fhltBt dMySsi"
role="presentation"
/>
</div>
Expand Down Expand Up @@ -672,13 +672,13 @@ it("renders correctly", () => {
</div>
</div>
<div
class="sc-fodVek thHgQ"
class="sc-hBEYId gmCgJa"
>
<div
class="sc-hBEYId gzPWTm"
class="sc-kstqJO dLrQOZ"
>
<div
class="sc-kfzBvY bFzGOQ"
class="sc-dmlqKv fQPQVn"
>
<svg
class="sc-gsTEea fEVstH"
Expand Down Expand Up @@ -813,7 +813,7 @@ it("renders correctly", () => {
class="css-1rzh7ej"
/>
<div
class="sc-fKFxtB eigPKS"
class="sc-kfzBvY gDkqat"
>
<button
class="css-1ksg6kp-ThemeSwitcher"
Expand Down Expand Up @@ -923,10 +923,10 @@ it("renders correctly", () => {
</div>
</div>
<div
class="sc-dIUeWJ hBIdQR"
class="sc-idOiZg knZyJz"
>
<a
class="sc-bBXrwG kqTzrD"
class="sc-fKFxtB fiwbGU"
href="https://twitter.com/ape_swap"
rel="noopener noreferrer"
target="_blank"
Expand All @@ -952,7 +952,7 @@ it("renders correctly", () => {
</svg>
</a>
<a
class="sc-bBXrwG kqTzrD"
class="sc-fKFxtB fiwbGU"
href="https://apeswap.click/discord"
rel="noopener noreferrer"
target="_blank"
Expand Down Expand Up @@ -994,7 +994,7 @@ it("renders correctly", () => {
</svg>
</a>
<a
class="sc-bBXrwG kqTzrD"
class="sc-fKFxtB fiwbGU"
href="https://t.me/ape_swap"
rel="noopener noreferrer"
target="_blank"
Expand All @@ -1020,7 +1020,7 @@ it("renders correctly", () => {
</svg>
</a>
<a
class="sc-bBXrwG kqTzrD"
class="sc-fKFxtB fiwbGU"
href="https://www.reddit.com/r/Apeswap/"
rel="noopener noreferrer"
target="_blank"
Expand All @@ -1046,7 +1046,7 @@ it("renders correctly", () => {
</svg>
</a>
<a
class="sc-bBXrwG kqTzrD"
class="sc-fKFxtB fiwbGU"
href="https://ape-swap.medium.com/"
rel="noopener noreferrer"
target="_blank"
Expand Down Expand Up @@ -1080,7 +1080,7 @@ it("renders correctly", () => {
</svg>
</a>
<a
class="sc-bBXrwG kqTzrD"
class="sc-fKFxtB fiwbGU"
href="https://www.instagram.com/apeswap.finance/"
rel="noopener noreferrer"
target="_blank"
Expand Down Expand Up @@ -1115,13 +1115,13 @@ it("renders correctly", () => {
</a>
</div>
<div
class="sc-iwyWTf qdCXx"
class="sc-bBXrwG boUgcl"
>
<div
style="margin-right: 21px;"
>
<a
class="sc-fFucqa bjYQlW"
class="sc-fodVek jVnpHB"
href="https://info.apeswap.finance/token/0x603c7f932ed1fc6575303d8fb018fdcbb0f39a95"
target="_blank"
>
Expand Down Expand Up @@ -1203,7 +1203,7 @@ it("renders correctly", () => {
class="css-e2mh0b-MobileLinks"
>
<div
class="sc-lmoMya efZEWw"
class="sc-cxFLGX kIdQXp"
>
<span
class="css-1k1lj3q-MobileLinkMenu"
Expand All @@ -1223,7 +1223,7 @@ it("renders correctly", () => {
</svg>
</div>
<div
class="sc-lmoMya efZEWw"
class="sc-cxFLGX kIdQXp"
>
<span
class="css-1k1lj3q-MobileLinkMenu"
Expand All @@ -1243,7 +1243,7 @@ it("renders correctly", () => {
</svg>
</div>
<div
class="sc-lmoMya kKdfjX"
class="sc-cxFLGX iiQhjC"
>
<span
class="css-1k1lj3q-MobileLinkMenu"
Expand All @@ -1265,7 +1265,7 @@ it("renders correctly", () => {
</div>
</div>
<svg
class="sc-gsTEea fQWPxo sc-idOiZg hysgHz"
class="sc-gsTEea fQWPxo sc-bkzYnD gnbGR"
color="text"
viewBox="0 0 425 398"
width="20px"
Expand Down
19 changes: 4 additions & 15 deletions src/components/Tag/LpTag.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
import React from "react";
import { useTheme } from "styled-components";
import { StyledLpTag, LightText, DarkText } from "./styles";
import { LpTypeVariants } from "./types";

export interface LpTagProps {
variant?: LpTypeVariants;
}

const LpTag: React.FC<LpTagProps> = ({ variant = LpTypeVariants.APE, ...props }) => {
const { isDark } = useTheme();
import { StyledLpTag, StyledLPText } from "./styles";
import { LpTagProps } from "./types";

const LpTag: React.FC<LpTagProps> = ({ variant, ...props }) => {
return (
<StyledLpTag variant={variant} {...props}>
{isDark ? (
<DarkText variant={variant}>{variant} LP</DarkText>
) : (
<LightText variant={variant}>{variant} LP</LightText>
)}
<StyledLPText>{variant} LP</StyledLPText>
</StyledLpTag>
);
};
Expand Down
7 changes: 4 additions & 3 deletions src/components/Tag/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styled from "styled-components";
import { Meta } from "@storybook/react/types-6-0";
import { CommunityIcon, RemoveIcon } from "../Svg";
import Tag from "./Tag";
import { LpTypeVariants, variants } from "./types";
import { variants } from "./types";
import LpTag from "./LpTag";

const Row = styled.div`
Expand Down Expand Up @@ -39,8 +39,9 @@ export const Default: React.FC = () => {
))}
</Row>
<Row>
<LpTag variant={LpTypeVariants.APE} />
<LpTag variant={LpTypeVariants.UNI} />
<LpTag variant="ape" />
<LpTag variant="uni" />
<LpTag variant="ark" />
</Row>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tag/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { default as Tag } from "./Tag";
export { default as LpTag } from "./LpTag";
export type { TagProps, Variants as TagVariants } from "./types";
export { LpTypeVariants } from "./types";
export type { LpTagVariants } from "./types";
Loading

0 comments on commit 21bd5e0

Please sign in to comment.