Skip to content

Commit

Permalink
Merge branch 'develop' into refactor/graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
songwongtp committed Sep 18, 2024
2 parents f96c818 + 19be295 commit 843398d
Show file tree
Hide file tree
Showing 29 changed files with 1,314 additions and 1,170 deletions.
4 changes: 2 additions & 2 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Preview } from "@storybook/react";
import customTheme from "../src/lib/styles/theme";
import defaultTheme from "../src/lib/styles/theme";

const preview: Preview = {
parameters: {
Expand All @@ -11,7 +11,7 @@ const preview: Preview = {
},
},
chakra: {
theme: customTheme,
theme: defaultTheme,
},
},
};
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1135](https://github.com/alleslabs/celatone-frontend/pull/1135) Update txs to get data from API instead of GraphQL
- [#1136](https://github.com/alleslabs/celatone-frontend/pull/1136) Update code to get data from API instead of GraphQL
- [#1132](https://github.com/alleslabs/celatone-frontend/pull/1132) Update account type to get data from API instead of GraphQL
- [#1149](https://github.com/alleslabs/celatone-frontend/pull/1149) Refactor component react select input
- [#1094](https://github.com/alleslabs/celatone-frontend/pull/1094) Replace getFirstQueryParam with zod validation

### Bug fixes
Expand Down
1,550 changes: 846 additions & 704 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/lib/components/TxRelationSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Box } from "@chakra-ui/react";

import type { Option } from "lib/types";

import { SelectInput } from "./forms";
import { SelectInputBase } from "./forms";

enum RelationType {
ALL = "ALL",
Expand Down Expand Up @@ -55,7 +55,7 @@ export const TxRelationSelection = ({

return (
<Box {...props}>
<SelectInput
<SelectInputBase
formLabel="Filter by Relation"
size={size}
options={relationOptions}
Expand Down
31 changes: 4 additions & 27 deletions src/lib/components/abi/args-form/field/ArgFieldWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Input, Textarea } from "@chakra-ui/react";
import { Select } from "chakra-react-select";
import type { ControllerRenderProps } from "react-hook-form";

import { useCurrentChain, useExampleAddresses } from "lib/app-provider";
import { SelectInput } from "lib/components/forms";
import type { BechAddr20, Nullable } from "lib/types";

import {
Expand Down Expand Up @@ -86,39 +86,16 @@ export const ArgFieldWidget = ({

if (type === "bool")
return (
<Select
<SelectInput
classNamePrefix="chakra-react-select"
size="md"
options={boolOptions}
placeholder={" "}
placeholder=""
value={boolOptions.find(
({ value: optionValue }) => optionValue === value
)}
onChange={(e) => onChange(e?.value)}
menuPosition="fixed"
onChange={(newValue) => onChange(newValue?.value)}
menuPortalTarget={document.body}
chakraStyles={{
control: (provided) => ({
...provided,
_disabled: {
color: "text.main",
},
}),
dropdownIndicator: (provided, state) => ({
...provided,
color: state.isDisabled ? "gray.700" : undefined,
}),
option: (provided) => ({
...provided,
color: "text.main",
_hover: {
bg: "gray.700",
},
_selected: {
bg: "gray.800",
},
}),
}}
/>
);

Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/forms/FilterByPermission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Grid } from "@chakra-ui/react";
import type { IconKeys } from "../icon";
import type { PermissionFilterValue } from "lib/hooks";

import { SelectInput } from "./SelectInput";
import { SelectInputBase } from "./SelectInputBase";

interface PermissionOption {
label: string;
Expand Down Expand Up @@ -51,7 +51,7 @@ export const FilterByPermission = ({
maxWidth = "360px",
}: FilterByPermissionProps) => (
<Grid columnGap={4} w="full" maxW={{ md: maxWidth }}>
<SelectInput<PermissionFilterValue>
<SelectInputBase<PermissionFilterValue>
formLabel="Filter by Instantiate Permission"
options={options}
onChange={setPermissionValue}
Expand Down
Loading

0 comments on commit 843398d

Please sign in to comment.