Skip to content

Commit

Permalink
chore: Add new lptype tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ape-fede committed Dec 14, 2022
1 parent b3af036 commit f44faf7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 35 deletions.
11 changes: 2 additions & 9 deletions src/components/Tag/LpTag.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
import React from "react";
import { useTheme } from "styled-components";
import { StyledLpTag, LightText, DarkText } from "./styles";
import { StyledLpTag, StyledLPText } from "./styles";
import { LpTagProps } from "./types";

const LpTag: React.FC<LpTagProps> = ({ variant, ...props }) => {
const { isDark } = useTheme();

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
16 changes: 3 additions & 13 deletions src/components/Tag/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,10 @@ export const StyledLpTag = styled.div<CustomProps>`
padding: 0 5px;
`;

export const LightText = styled.div<CustomProps>`
background: ${({ theme, variant = "ape" }) => theme?.colors?.lpTagText?.[variant]};
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
export const StyledLPText = styled.div<{ theme: DefaultTheme }>`
color: ${({ theme }) => theme?.colors?.primaryBright};
text-transform: uppercase;
font-size: 10px;
font-weight: 500;
line-height: 15px;
`;

export const DarkText = styled.div<CustomProps>`
color: ${({ theme, variant = "ape" }) => theme?.colors?.lpTagText?.[variant]};
text-transform: uppercase;
font-size: 10px;
font-weight: 500;
font-weight: 600;
line-height: 15px;
`;
16 changes: 4 additions & 12 deletions src/theme/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,8 @@ export const lightColors: Colors = {
bubblegum: "linear-gradient(139.73deg, #E6FDFF 0%, #F3EFFF 100%)",
},
lpTagBg: {
ape: "linear-gradient(53.53deg, rgba(161, 101, 82, 0.35) 15.88%, rgba(225, 178, 66, 0.35) 92.56%)",
uni: "rgba(213, 49, 113, 0.15)",
},
lpTagText: {
ape: "linear-gradient(53.53deg, #A16552 15.88%, #E1B242 92.56%)",
uni: "#D53171",
ape: "linear-gradient(99.09deg, rgba(161, 101, 82, 0.8) 0%, rgba(255, 179, 0, 0.8) 106.96%)",
uni: "rgba(213, 49, 113, 0.8)",
},
primaryButtonDisable: "rgba(66, 66, 66, 0.5)",
secondaryButtonDisableBg: "#F1EADA",
Expand All @@ -61,12 +57,8 @@ export const darkColors: Colors = {
bubblegum: "linear-gradient(139.73deg, #313D5C 0%, #3D2A54 100%)",
},
lpTagBg: {
ape: "linear-gradient(53.53deg, rgba(161, 101, 82, 0.5) 15.88%, rgba(225, 178, 66, 0.5) 92.56%)",
uni: "rgba(213, 49, 113, 0.15)",
},
lpTagText: {
ape: "rgba(255, 255, 255, 0.75)",
uni: "#D53171",
ape: "linear-gradient(99.09deg, rgba(161, 101, 82, 0.8) 0%, rgba(255, 179, 0, 0.8) 106.96%)",
uni: "rgba(213, 49, 113, 0.8)",
},
primaryButtonDisable: "rgba(241, 234, 218, 0.5)",
secondaryButtonDisableBg: "rgba(33, 33, 33, 0.5)",
Expand Down
1 change: 0 additions & 1 deletion src/theme/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export type Colors = {
yellowHover: string;
input: string;
lpTagBg: LpTagColors;
lpTagText: LpTagColors;

// Gradients
gradients?: Gradients;
Expand Down

0 comments on commit f44faf7

Please sign in to comment.