Skip to content

Commit

Permalink
fix(surveys): style the link button with black text (#1343)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarticus authored Aug 6, 2024
1 parent 682e088 commit 7fba90b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/extensions/surveys/components/PostHogLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import { IconPosthogLogo } from '../icons'
// import { getContrastingTextColor } from '../surveys-utils'

export function PostHogLogo() {
// const textColor = getContrastingTextColor(backgroundColor)

return (
<a href="https://posthog.com" target="_blank" rel="noopener" className="footer-branding">
<a
href="https://posthog.com"
target="_blank"
rel="noopener"
// style={{ backgroundColor: backgroundColor, color: textColor }}
className="footer-branding"
>
Survey by {IconPosthogLogo}
</a>
)
Expand Down
2 changes: 2 additions & 0 deletions src/extensions/surveys/surveys-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ export const style = (appearance: SurveyAppearance | null) => {
font-weight: 500;
background: ${appearance?.backgroundColor || '#eeeded'};
text-decoration: none;
backgroundColor: ${appearance?.backgroundColor || '#eeeded'};
color: ${getContrastingTextColor(appearance?.backgroundColor || '#eeeded')};
}
.survey-question {
font-weight: 500;
Expand Down

0 comments on commit 7fba90b

Please sign in to comment.