From 1659fe77c8a633775d9821a3ba982858e4eefe25 Mon Sep 17 00:00:00 2001 From: Nic Gordon Date: Wed, 7 Jul 2021 11:15:21 +1000 Subject: [PATCH] Allow custom styles to be passed --- src/underline-emphasis/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/underline-emphasis/index.tsx b/src/underline-emphasis/index.tsx index c563cbf..2deea4c 100644 --- a/src/underline-emphasis/index.tsx +++ b/src/underline-emphasis/index.tsx @@ -17,7 +17,8 @@ const fixedStyle: React.CSSProperties = { export const UnderlineEmphasis: React.FunctionComponent<{ children?: string; -}> = ({ children }) => { + style?: React.CSSProperties; +}> = ({ children, style = {} }) => { if (typeof window === 'undefined' || !children || !children.length) { return null; } @@ -79,6 +80,7 @@ export const UnderlineEmphasis: React.FunctionComponent<{ style={{ ...fixedStyle, backgroundImage: "url('data:image/svg+xml;base64," + encodedSvg + "')", + ...style, }} > {children}