Skip to content

Commit

Permalink
fix(QueryBuilder): deprecated typography removed and links replaced b…
Browse files Browse the repository at this point in the history
…y buttons in empty state
  • Loading branch information
MEsteves22 authored and plagoa committed Nov 24, 2023
1 parent 5321d09 commit f41d9b9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
10 changes: 10 additions & 0 deletions packages/core/src/components/QueryBuilder/QueryBuilder.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,14 @@ export const { useClasses, staticClasses } = createClasses("HvQueryBuilder", {
backgroundColor: theme.colors.atmo2,
display: "inline-flex",
},
createConditionButton: {
cursor: "pointer",
backgroundColor: "transparent",
padding: 0,
},
createGroupButton: {
cursor: "pointer",
backgroundColor: "transparent",
padding: 0,
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -202,28 +202,25 @@ export const RuleGroup = ({
message={
<>
<HvTypography
variant="link"
component="a"
link
component="button"
onClick={() => {
dispatchAction({ type: "add-rule", id });
}}
style={{ cursor: "pointer", textDecoration: "underline" }}
className={classes.createConditionButton}
>
{`${labels.empty?.createCondition}`}
</HvTypography>
{level <= normalizedMaxDepth && (
<>
{`${labels.empty?.spacer}`}
<HvTypography
variant="link"
component="a"
link
component="button"
onClick={() => {
dispatchAction({ type: "add-group", id });
}}
style={{
cursor: "pointer",
textDecoration: "underline",
}}
className={classes.createGroupButton}
>
{`${labels.empty?.createGroup}`}
</HvTypography>
Expand Down
8 changes: 8 additions & 0 deletions packages/styles/src/themes/ds3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,14 @@ const ds3 = makeTheme((theme) => ({
bottom: `calc(-1 * ${theme.space.md} * 0.5)`,
right: `calc(${theme.space.sm} * 1.75)`,
},
createConditionButton: {
...theme.typography.link,
textDecoration: "underline",
},
createGroupButton: {
...theme.typography.link,
textDecoration: "underline",
},
},
},
HvQueryBuilderRule: {
Expand Down

0 comments on commit f41d9b9

Please sign in to comment.