Skip to content

Commit

Permalink
chore(web): create color field (#1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-abe-dev authored Jun 17, 2024
1 parent 7c76a84 commit 936e65a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions web/src/beta/ui/fields/ColorField.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { FC } from "react";

import { ColorInput, ColorInputProps } from "@reearth/beta/lib/reearth-ui";

import CommonField, { CommonFieldProps } from "./CommonField";

export type ColorInputFieldProps = CommonFieldProps &
Pick<ColorInputProps, "value" | "size" | "onChange" | "alphaDisabled" | "disabled">;

const ColorInputField: FC<ColorInputFieldProps> = ({ title, description, ...props }) => {
return (
<CommonField title={title} description={description}>
<ColorInput {...props} />
</CommonField>
);
};

export default ColorInputField;
1 change: 1 addition & 0 deletions web/src/beta/ui/fields/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from "./CommonField";
export * from "./InputField";
export * from "./ColorField";

0 comments on commit 936e65a

Please sign in to comment.