Skip to content

Commit

Permalink
🎨Renamed CFCaption -> CFLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
carefree0910 committed May 17, 2023
1 parent d2a30cd commit 2e0053b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cfdraw/.web/src/components/CFSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import React, { useCallback, useEffect, useState } from "react";
import { BoardStore, useGlobalTransform, useIsReady } from "@carefree0910/business";

import { themeStore } from "@/stores/theme";
import { CFCaption } from "./CFText";
import { CFLabel } from "./CFText";
import CFInput from "./CFInput";
import CFTooltip from "./CFTooltip";

Expand Down Expand Up @@ -134,7 +134,7 @@ const CFSlider: React.FC<ICFSlider> = ({
return (
<Flex className={className} align="center" color={textColor} {...props}>
<CFTooltip label={tooltip}>
<CFCaption label={label} />
<CFLabel label={label} />
</CFTooltip>
<Slider
focusThumbOnChange={!iptFocused}
Expand Down
2 changes: 1 addition & 1 deletion cfdraw/.web/src/components/CFText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const CFText = forwardRef(function (props: TextProps, ref) {

return <Text ref={ref} color={textColor} {...props} />;
});
export const CFCaption = observer(
export const CFLabel = observer(
forwardRef(function ({ label, ...props }: TextProps & { label?: string }, ref) {
return (
<>
Expand Down
4 changes: 2 additions & 2 deletions cfdraw/.web/src/plugins/components/Fields/SelectField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { runOneTimeSocketHook } from "@/stores/socket";
import { getMetaField, setMetaField } from "@/stores/meta";
import { parseIStr } from "@/actions/i18n";
import CFTooltip from "@/components/CFTooltip";
import { CFCaption } from "@/components/CFText";
import { CFLabel } from "@/components/CFText";
import { CFSrollableSelect } from "@/components/CFSelect";
import { useDefaultFieldValue } from "./utils";

Expand Down Expand Up @@ -53,7 +53,7 @@ function SelectField({ field, definition }: IField<ISelectField<string>>) {
return (
<Flex w="100%" h="100%" align="center" {...definition.props}>
<CFTooltip label={tooltip}>
<CFCaption label={label} />
<CFLabel label={label} />
</CFTooltip>
<Box w="8px" />
<CFSrollableSelect
Expand Down

0 comments on commit 2e0053b

Please sign in to comment.