Skip to content

Commit

Permalink
🔥 remove label type
Browse files Browse the repository at this point in the history
  • Loading branch information
StarHeartHunt committed Nov 21, 2023
1 parent b0aca95 commit 684ba0f
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions website/src/components/Form/Items/Tag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export type Props = {

export default function TagFormItem({ onTagUpdate }: Props): JSX.Element {
const [tags, setTags] = useState<TagType[]>([]);
const [labelType, setLabelType] = useState<string>("");
const [label, setLabel] = useState<TagType["label"]>("");
const [color, setColor] = useState<TagType["color"]>("#ea5252");

Expand All @@ -30,7 +29,7 @@ export default function TagFormItem({ onTagUpdate }: Props): JSX.Element {
return;
}
if (validateTag()) {
const tag: TagType = { label: labelType + label, color };
const tag: TagType = { label: label, color };
setTags([...tags, tag]);
}
};
Expand All @@ -44,9 +43,6 @@ export default function TagFormItem({ onTagUpdate }: Props): JSX.Element {
const onChangeColor = (color: ColorResult) => {
setColor(color.hex as TagType["color"]);
};
const onChangeLabelType = (e: { target: { value: string } }) => {
setLabelType(e.target.value);
};

return (
<>
Expand All @@ -69,18 +65,6 @@ export default function TagFormItem({ onTagUpdate }: Props): JSX.Element {
</span>
)}
</label>
<div className="form-item-container">
<span className="form-item form-item-title">标签类型</span>
<select
className="form-item form-item-select"
defaultValue=""
onChange={onChangeLabelType}
>
<option value="">Other</option>
<option value="a:">Adapter</option>
<option value="t:">Topic</option>
</select>
</div>
<div className="form-item-container">
<span className="form-item form-item-title">标签名称</span>
<input
Expand Down

0 comments on commit 684ba0f

Please sign in to comment.