Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUP-190 | @rebeccahongsf | style text area paragraph #9

Merged
merged 10 commits into from
May 22, 2024
4 changes: 2 additions & 2 deletions src/components/config-pages/local-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ const LocalFooter = ({

{/* Social Links */}
{suLocalFootSocial &&
<ul className="list-unstyled flex rs-mb-0 [&_a]:text-white [&_a:hover]:text-bay-light">
<ul className="list-unstyled flex rs-mb-0">
{suLocalFootSocial.map((link, index) => {
if (!link.url) return;
return (
<li key={`footer-action-link-${index}`} className="rs-mr-0">
<Link href={link.url}>
<Link href={link.url} className="text-white hocus:text-bay-light">
<SocialIcon url={link.url}/>
<span className="sr-only">{link.title}</span>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/components/elements/action-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Props = HtmlHTMLAttributes<HTMLAnchorElement> & {

const ActionLink = ({ children, className, ...props }: Props) => {
return (
<Link {...props} className={twMerge("relative", className?.replace("link--action", ""))}>
<Link {...props} className={twMerge("relative text-digital-red *:text-digital-red hocus:text-archway-dark *:hocus:text-archway-dark", className?.replace("link--action", ""))}>
{children}
<ArrowLongRightIcon height={20} className="ml-2 inline-block mb-2"/>
</Link>
Expand Down
4 changes: 2 additions & 2 deletions src/components/elements/headers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ export const H4 = ({children, className, ...props}: Props) => {

export const H5 = ({children, className, ...props}: Props) => {
return (
<h5 className={twMerge(headingLinkClasses, className)} {...props}>
<h5 className={twMerge(headingLinkClasses, "text-m1 font-medium", className)} {...props}>
{children}
</h5>
)
}

export const H6 = ({children, className, ...props}: Props) => {
return (
<h6 className={twMerge(headingLinkClasses, className)} {...props}>
<h6 className={twMerge(headingLinkClasses, "text-m1 font-medium", className)} {...props}>
{children}
</h6>
)
Expand Down
4 changes: 2 additions & 2 deletions src/components/elements/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {EnvelopeIcon} from "@heroicons/react/24/outline";
import ActionLink from "@components/elements/action-link";
import Button from "@components/elements/button";
import {LinkProps} from "next/dist/client/link";
import {twMerge} from "tailwind-merge";
import clsx from "clsx";

type Props = HtmlHTMLAttributes<HTMLAnchorElement | HTMLButtonElement> & LinkProps & {
/**
Expand Down Expand Up @@ -44,7 +44,7 @@ const DrupalLink = ({href, children, ...props}: Props) => {
}

return (
<Link href={href} {...props} className={twMerge("text-stone-dark hocus:text-archway-dark", props.className)}>
<Link href={href} className={clsx("text-digital-red *:text-digital-red hocus:text-archway-dark *:hocus:text-archway-dark", props.className)} {...props}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does *: do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Direct children styling! TW Docs for ref 😄

{children}
{href.startsWith("mailto") &&
<EnvelopeIcon width={20} className="ml-4 inline-block"/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/elements/wysiwyg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Wysiwyg = ({html, className, ...props}: Props) => {

const addMathJax = html.match(/\$\$.*\$\$/) || html.match(/\\\[.*\\\]/) || html.match(/\\\(.*\\\)/);
return (
<div className={twMerge("wysiwyg", className)} {...props}>
<div className={twMerge("wysiwyg [&_a]:text-digital-red hocus:[&_a]:text-archway-dark", className)} {...props}>
{addMathJax && <Mathjax/>}
{formatHtml(html)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const MediaCaptionParagraph = ({paragraph, ...props}: Props) => {

<figcaption>
{paragraph.suMediaCaptionLink?.url &&
<Link href={paragraph.suMediaCaptionLink.url} className="link--action font-normal">
<Link href={paragraph.suMediaCaptionLink.url} className="link--action font-normal text-stone-dark *:text-stone-dark hocus:text-archway-dark *:hocus:text-archway-dark">
{paragraph.suMediaCaptionLink.title}
</Link>
}
Expand Down