From a5cb68c24a65380c7665285b82e15455022980c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Kapu=C5=9Bciak?= <39658211+kacperkapusciak@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:54:58 +0100 Subject: [PATCH] docs: add State of React Native 2024 banner (#3300) ## Description This PR adds a State of React Native 2024 banner to the top of Gesture Handler documentation. _Fill out the survey now_ button leads to https://survey.stateofreactnative.com/ The banner **will automatically disappear January 8.** ### Desktop ### Tablet ### Mobile ## How to test? ``` cd docs yarn yarn start ``` --- docs/docusaurus.config.js | 6 +- .../theme/AnnouncementBar/Content/index.js | 15 +++-- .../AnnouncementBar/Content/styles.module.css | 58 ++++++++++++++----- docs/src/theme/AnnouncementBar/index.js | 6 +- .../theme/AnnouncementBar/styles.module.css | 14 ++++- docs/static/img/appjs.svg | 1 - .../static/img/state-of-react-native-logo.svg | 5 ++ 7 files changed, 79 insertions(+), 26 deletions(-) delete mode 100644 docs/static/img/appjs.svg create mode 100644 docs/static/img/state-of-react-native-logo.svg diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 6d745a57d1..a7522c2d29 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -99,10 +99,12 @@ const config = { }, ], }, + // State of React Native survey banner announcementBar: { + id: 'state-of-react-native-2024', content: ' ', - backgroundColor: '#03c', - textColor: '#fff', + backgroundColor: '#b1dfd0', + textColor: '#001a72', }, footer: { style: 'light', diff --git a/docs/src/theme/AnnouncementBar/Content/index.js b/docs/src/theme/AnnouncementBar/Content/index.js index f559bb0b08..47b99b8a5a 100644 --- a/docs/src/theme/AnnouncementBar/Content/index.js +++ b/docs/src/theme/AnnouncementBar/Content/index.js @@ -2,23 +2,28 @@ import React from 'react'; import clsx from 'clsx'; import ArrowButton from './ArrowButton'; import styles from './styles.module.css'; +import useBaseUrl from '@docusaurus/useBaseUrl'; export default function AnnouncementBarContent(props) { return (