Skip to content

Commit

Permalink
refactor: update filter group container styles
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs committed Aug 4, 2024
1 parent 2a8d304 commit 3ccf45a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .changeset/seven-pandas-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fn-sphere/filter": patch
---

Update styles for default templates
17 changes: 6 additions & 11 deletions packages/filter/src/views/filter-group-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,22 @@ export const FilterGroupContainer = ({
className="filter-group-container"
style={{
display: "flex",
flexDirection: "column",
borderRadius: 4,
padding: 4,
background: "rgba(0, 0, 0, 0.05)",
}}
>
<div
style={{
display: "flex",
justifyContent: "center",
alignItems: "center",
marginRight: 12,
whiteSpace: "nowrap",
}}
>
{text}
</div>
<div
style={{
borderRadius: 4,
padding: 4,
background: "rgba(0, 0, 0, 0.05)",
}}
>
{children}
</div>
{children}
</div>
);
};
7 changes: 3 additions & 4 deletions packages/filter/src/views/rule-joiner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ export const RuleJoiner = ({ parent }: RuleJoinerProps) => {
const operator = parent.op;
return (
<div
className={`rule-joiner-${operator}`}
style={{
margin: 8,
margin: 4,
}}
>
{operator === "or" ? "Or" : "And"}
</div>
></div>
);
};
1 change: 1 addition & 0 deletions packages/filter/src/views/single-filter-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const SingleFilterContainer = ({
className="single-filter-container"
style={{
display: "flex",
gap: 4,
}}
>
{children}
Expand Down
4 changes: 1 addition & 3 deletions packages/playground/src/filter/flatten-filter-builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ export const FlattenFilterBuilder = <Data,>({
joinBetween={[andGroup.conditions[ruleIdx - 1], rule]}
/>
)}
<div className="rule-container">
{<FilterRule rule={rule} />}
</div>
<FilterRule rule={rule} />
</Fragment>
))}
</FilterGroupContainer>
Expand Down

0 comments on commit 3ccf45a

Please sign in to comment.