Skip to content

Commit

Permalink
Update ooni components to fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
majakomel committed Aug 23, 2024
1 parent 4d75574 commit 67e29a1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 23 deletions.
14 changes: 0 additions & 14 deletions components/FormattedMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,12 @@ const MdH1 = ({ children, className, ...props }) => (
</h3>
)

const MdUL = ({ children, className, ...props }) => (
<ul className={twMerge('list-disc ps-10', className)} {...props}>
{children}
</ul>
)

const MdP = ({ children, className, ...props }) => (
<p className={twMerge('my-3', className)} {...props}>
{children}
</p>
)

export const FormattedMarkdownBase = ({ children }) => {
return (
<Markdown
options={{
overrides: {
h1: { component: MdH1 },
ul: { component: MdUL },
p: { component: MdP },
},
}}
>
Expand Down
2 changes: 1 addition & 1 deletion components/country/Overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const Overview = ({
{featuredArticles.length === 0 ? (
<FormattedMessage id="Country.Overview.FeaturedResearch.None" />
) : (
<ul className="ps-10 list-disc">
<ul>
{featuredArticles.map((article, index) => (
<li key={index}>
<FeaturedArticle link={article.href} title={article.title} />
Expand Down
1 change: 0 additions & 1 deletion components/findings/FindingDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { getLocalisedRegionName } from 'utils/i18nCountries'
const FormattedMarkdown = ({ children }) => {
return (
<Markdown
className="[&>p]:my-5"
options={{
overrides: {
MAT: {
Expand Down
2 changes: 1 addition & 1 deletion components/findings/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ const Form = ({ defaultValues, onSubmit }) => {
return (
<>
<Modal
className="w-full max-w-[1000px] -translate-x-1/2 -translate-y-1/2"
className="w-full max-w-[1000px]"
show={showPreview}
onHideClick={() => setShowPreview(!showPreview)}
>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"markdown-to-jsx": "^7.4.0",
"next": "^14.2.4",
"nprogress": "^0.2.0",
"ooni-components": "0.7.0-alpha.7",
"ooni-components": "0.7.0-alpha.8",
"pretty-ms": "^8.0.0",
"prop-types": "^15.8.1",
"react": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const LandingPage = ({ measurementCount, asnCount, countryCount }) => {
<div className="inline-block">
<Link href="/chart/mat">
<button
className="btn btn-white-hollow btn-xl mt-12 mx-auto"
className="btn btn-white-hollow hover:!text-white btn-xl mt-12 mx-auto"
type="button"
>
<FormattedMessage id="Home.Banner.Button.Explore" />
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4924,10 +4924,10 @@ onetime@^5.1.0, onetime@^5.1.2:
dependencies:
mimic-fn "^2.1.0"

[email protected].7:
version "0.7.0-alpha.7"
resolved "https://registry.yarnpkg.com/ooni-components/-/ooni-components-0.7.0-alpha.7.tgz#2f43791b41e2ae064b94ff46c6cdbb23e809e344"
integrity sha512-2/fI7XFbOzGPt84P9LMbmYGYx8tMIhRNtSsPnq0a4Hm4Sk7b27TJIHMwveL1SUfgzgc4zl8lzyHi26W7YUdDTw==
[email protected].8:
version "0.7.0-alpha.8"
resolved "https://registry.yarnpkg.com/ooni-components/-/ooni-components-0.7.0-alpha.8.tgz#8e370075424eb6af4b9f5e797ddf30b0b3522df1"
integrity sha512-d6fURpQ/VoaQUi5AiAe7eT/LFiDkMPuDpgixGPDEM0D7sMv38RMgSIZuHhlNl/Ol/TUPLdxS5Ta3XW6DkuUKcg==
dependencies:
class-variance-authority "^0.7.0"
clsx "^2.1.1"
Expand Down

0 comments on commit 67e29a1

Please sign in to comment.