Skip to content

Commit

Permalink
override link text decoration styles
Browse files Browse the repository at this point in the history
  • Loading branch information
pettinarip committed Jun 30, 2023
1 parent 2434529 commit 86aeba6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/ButtonLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,21 @@ const ButtonLink: React.FC<IProps> = ({ children, isSecondary, ...props }) => {
* Prevent React warning that does not recognize `isSecondary` on DOM
* while still sending prop to the theme config
*/
const styles = useStyleConfig("Button", { ...props, isSecondary })
const styles = useStyleConfig("Button", {
...props,
isSecondary,
})

return (
<Button
as={Link}
textDecoration="none"
activeStyle={{}}
// `styles` object sent to `sx` prop per convention
sx={styles}
sx={{
...styles,
textDecoration: "none",
_hover: { ...styles["_hover"], textDecoration: "none" },
}}
{...props}
>
{children}
Expand Down

0 comments on commit 86aeba6

Please sign in to comment.