Skip to content

Commit

Permalink
Use blue color outlines
Browse files Browse the repository at this point in the history
  • Loading branch information
synzen committed Feb 17, 2025
1 parent b29c433 commit ee9c7bf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ export const Condition = ({ onDelete, prefix = "", deletable, containerProps }:
alignItems="flex-start"
{...containerProps}
borderRadius="md"
outline={isFocused ? `2px solid ${getChakraColor("whiteAlpha.600")}` : undefined}
outline={isFocused ? `2px solid ${getChakraColor("blue.300")}` : undefined}
bg={isFocused ? "blackAlpha.500" : undefined}
_hover={{
outline: `2px solid ${getChakraColor("whiteAlpha.800")} !important`,
outline: `2px solid ${getChakraColor("blue.100")} !important`,
background: "blackAlpha.700",
}}
pt={2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
Box,
BoxProps,
Button,
CloseButton,
Divider,
Flex,
FormControl,
Expand Down Expand Up @@ -158,30 +157,26 @@ export const LogicalExpressionForm = ({ onDeleted, prefix = "", containerProps }
// overflow="auto"
bg={isFocused ? "blackAlpha.500" : undefined}
outlineOffset={4}
outline={isFocused ? `2px solid ${getChakraColor("whiteAlpha.600")}` : undefined}
outline={isFocused ? `2px solid ${getChakraColor("blue.300")}` : undefined}
_hover={{
outline: `2px solid ${getChakraColor("whiteAlpha.800")} !important`,
outline: `2px solid ${getChakraColor("blue.100")} !important`,
background: "blackAlpha.700",
}}
>
<NavigableTreeItemExpandButton>
{({ onClick, isFocused, isExpanded }) => {
{({ onClick }) => {
return (
<chakra.button
tabIndex={-1}
type="button"
p={4}
textAlign={"left"}
textAlign="left"
onClick={onClick}
width="100%"
borderRadius={"md"}
borderRadius="md"
>
<HStack>
{isExpanded ? (
<ChevronUpIcon fontSize="lg" />
) : (
<ChevronDownIcon fontSize={"lg"} />
)}
{isExpanded ? <ChevronUpIcon fontSize="lg" /> : <ChevronDownIcon fontSize="lg" />}
<Text>Condition Group</Text>
</HStack>
</chakra.button>
Expand All @@ -205,7 +200,7 @@ export const LogicalExpressionForm = ({ onDeleted, prefix = "", containerProps }
{isExpanded && (
<Stack px={2} pt={4}>
{!!fields.length && (
<NavigableTreeItemGroup display="flex" gap={2} flexDirection={"column"} width="100%">
<NavigableTreeItemGroup display="flex" gap={2} flexDirection="column" width="100%">
{(fields as Array<FilterExpression & { id: string }>)?.map((child, childIndex) => {
const childPrefix = `${prefix}children.${childIndex}.`;

Expand Down Expand Up @@ -266,14 +261,12 @@ export const LogicalExpressionForm = ({ onDeleted, prefix = "", containerProps }
</MenuItem>
</MenuList>
</Menu>

<Button
onClick={onDeleted}
leftIcon={<DeleteIcon />}
size="sm"
variant="ghost"
colorScheme="red"
// w="100%"
>
Delete condition group
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export const FiltersForm = ({
control,
formState: { isDirty, isSubmitting },
setValue,
resetField,
reset,
} = formMethods;

Expand All @@ -59,11 +58,6 @@ export const FiltersForm = ({
name: "expression",
});

const onClickReset = (e?: React.MouseEvent) => {
e?.preventDefault();
resetField("expression");
};

const onDeletedExpression = async () => {
setValue("expression", null, {
shouldDirty: true,
Expand Down

0 comments on commit ee9c7bf

Please sign in to comment.