Skip to content

Commit 8d3032b

Browse files
committed
chore(fix): fixed and updated ui requirements for card and tag
1 parent 2cc1f7e commit 8d3032b

File tree

11 files changed

+29
-38
lines changed

11 files changed

+29
-38
lines changed

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module.exports = [
1919
...typescript.configs["recommended"].rules,
2020
...react.configs["recommended"].rules,
2121
"no-console": ["warn", { allow: ["warn", "error"] }],
22+
"react/prop-types": "off",
2223
"@typescript-eslint/no-unused-vars": "warn",
2324
},
2425
settings: {

src/components/button/Button.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const Button: React.FC<ButtonProps> = ({
4040
${variantStyles[variant]}
4141
${sizeStyles[size]}
4242
${disabled ? "opacity-50 cursor-not-allowed" : ""}
43+
${customClass}
4344
`.trim();
4445

4546
return (

src/components/card/BDPCard.tsx

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const BDPCard: React.FC<CardProps> = ({
3434
byBDP,
3535
}) => {
3636
const baseStyles = `border border-brand-stroke-on-base p-2
37-
flex min-h-[290px] w-[374px] rounded-2xl bg-brand-card-bg`;
37+
flex min-h-[290px] w-full md:max-w-[374px] rounded-2xl bg-brand-card-bg`;
3838

3939
const className = `
4040
${baseStyles}
@@ -62,8 +62,8 @@ export const BDPCard: React.FC<CardProps> = ({
6262
>
6363
<div className="flex flex-col rounded-xl border border-brand-stroke-on-base w-full min-h-full bg-brand-card-bg">
6464
<div
65-
className={`h-[126px] flex border border-l-0 border-r-0 border-t-0
66-
border-brand-stroke-on-base rounded-lg relative flex-col items-center justify-center`}
65+
className={`min-h-[126px] flex border border-l-0 border-r-0 border-t-0
66+
border-brand-stroke-on-base rounded-lg relative z-0 flex-col items-center justify-center`}
6767
style={{ backgroundColor: bannerColor }}
6868
>
6969
<div>
@@ -80,16 +80,21 @@ export const BDPCard: React.FC<CardProps> = ({
8080
)}
8181
</div>
8282
{/* Footer */}
83-
<div className="flex flex-col w-full p-3 gap-2">
84-
<div className="w-full flex items-center justify-between">
85-
<h6 className="font-montserrat text-lg font-semibold">{title}</h6>
86-
<Leaf
87-
showLeftOvers
88-
leavesCount={convertToLeavesCount(difficulty)}
89-
/>
83+
<div className="flex flex-col w-full h-full p-2 md:p-3 gap-1.5 md:gap-2 justify-between">
84+
<div className="flex flex-col gap-1.5 md:gap-2">
85+
<div className="w-full flex items-start justify-between">
86+
<h6 className="font-montserrat text-base md:text-lg font-semibold">
87+
{title}
88+
</h6>
89+
<Leaf
90+
showLeftOvers
91+
leavesCount={convertToLeavesCount(difficulty)}
92+
/>
93+
</div>
94+
<p className="font-light text-sm md:text-base font-quicksand">
95+
{description}
96+
</p>
9097
</div>
91-
<p className="font-light font-quicksand">{description}</p>
92-
9398
<div className="flex gap-[9px] flex-wrap">
9499
{tagList &&
95100
tagList.map((tag) => (

src/components/pill/Pill.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,3 @@ export const Pill: React.FC<PillProps> = ({
102102
</div>
103103
);
104104
};
105-
106-
Pill.propTypes = {
107-
state: PropTypes.oneOf(["default", "hover", "selected"]),
108-
onClick: PropTypes.func,
109-
className: PropTypes.string,
110-
children: PropTypes.node,
111-
selected: PropTypes.bool,
112-
onSelectChange: PropTypes.func,
113-
};

src/components/tag/Tag.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const Tag: React.FC<TagProps> = ({
7979
? config.color
8080
: effectiveState === "hover"
8181
? config.lightColor
82-
: "white";
82+
: "transparent";
8383
const renderBorderColor = config.color;
8484

8585
return (
@@ -129,13 +129,3 @@ export const Tag: React.FC<TagProps> = ({
129129
</div>
130130
);
131131
};
132-
133-
Tag.propTypes = {
134-
type: PropTypes.oneOf(["guide", "seminar", "tool", "interactive"]).isRequired,
135-
state: PropTypes.oneOf(["default", "hover", "selected"]),
136-
onClick: PropTypes.func,
137-
className: PropTypes.string,
138-
children: PropTypes.node,
139-
selected: PropTypes.bool,
140-
onSelectChange: PropTypes.func,
141-
};

src/icons/MicIcon.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ const MicIcon = ({
2121
<path
2222
d="M19.179 7.79078V12.1985C19.179 15.2414 16.7122 17.7082 13.6693 17.7082C10.6264 17.7082 8.15967 15.2414 8.15967 12.1985V7.79078C8.15967 4.74789 10.6264 2.28113 13.6693 2.28113C16.7122 2.28113 19.179 4.74789 19.179 7.79078Z"
2323
stroke="currentColor"
24-
strokeWidth={1.6529 || pathProps?.strokeWidth}
24+
strokeWidth={pathProps?.strokeWidth || 1.6529}
2525
/>
2626
<path
2727
d="M19.1793 7.79077H15.8735M19.1793 12.1985H15.8735"
2828
stroke="currentColor"
29-
strokeWidth={1.6529 || pathProps?.strokeWidth}
29+
strokeWidth={pathProps?.strokeWidth || 1.6529}
3030
strokeLinecap="round"
3131
/>
3232
<path
3333
d="M22.4849 12.1985C22.4849 17.0671 18.5381 21.0139 13.6695 21.0139M13.6695 21.0139C8.80081 21.0139 4.854 17.0671 4.854 12.1985M13.6695 21.0139V24.3197M13.6695 24.3197H16.9752M13.6695 24.3197H10.3637"
3434
stroke="currentColor"
35-
strokeWidth={1.6529 || pathProps?.strokeWidth}
35+
strokeWidth={pathProps?.strokeWidth || 1.6529}
3636
strokeLinecap="round"
3737
/>
3838
</svg>

src/icons/stories/icon.stories.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable react/prop-types */
2+
13
import React from "react";
24
import { StoryObj, Meta } from "@storybook/react";
35
import * as Icons from "../../icons";

src/stories/Button.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { fn } from "@storybook/test";
33
import { Button } from "./Button";
44

55
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
6-
const meta = {
6+
const meta: Meta<typeof Button> = {
77
title: "Example/Button",
88
component: Button,
99
parameters: {

src/stories/Header.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { fn } from "@storybook/test";
33

44
import { Header } from "./Header";
55

6-
const meta = {
6+
const meta: Meta<typeof Header> = {
77
title: "Example/Header",
88
component: Header,
99
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs

src/styles/tailwind.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#fafafa 50.33%,
4343
rgba(250, 250, 250, 0) 100%
4444
);
45+
--brand-orange-100: #eb5234;
4546
}
4647

4748
html {

0 commit comments

Comments
 (0)