diff --git a/packages/docs-reanimated/src/components/AvailableFrom/index.tsx b/packages/docs-reanimated/src/components/AvailableFrom/index.tsx
index 491867636660..e471a2e489b9 100644
--- a/packages/docs-reanimated/src/components/AvailableFrom/index.tsx
+++ b/packages/docs-reanimated/src/components/AvailableFrom/index.tsx
@@ -1,38 +1,46 @@
import React from 'react';
+import clsx from 'clsx';
+import { useColorMode } from '@docusaurus/theme-common';
+
import styles from './styles.module.css';
+import Danger from '/static/img/danger.svg';
+import DangerDark from '/static/img/danger-dark.svg';
interface Props {
version?: string;
- big?: any;
+ isFull?: boolean;
}
-export default function AvailableFrom({ version, big }: Props) {
- return (
- <>
- {big ? (
-
-
-
+export default function AvailableFrom({ version, isFull }: Props) {
+ const { colorMode } = useColorMode();
+ const isLightMode = colorMode === 'light';
+ const badgeThemeStyles = isLightMode ? styles.light : styles.dark;
+
+ const getBadgeContent = () => {
+ if (isFull) {
+ return (
+ <>
+
+ {isLightMode ? : }
Available from Reanimated{' '}
v{version}
-
- ) : (
-
Available from v{version}
- )}
- >
+ >
+ );
+ }
+
+ return <>Available from v{version}>;
+ };
+
+ return (
+
+ {getBadgeContent()}
+
);
}
diff --git a/packages/docs-reanimated/src/components/AvailableFrom/styles.module.css b/packages/docs-reanimated/src/components/AvailableFrom/styles.module.css
index 9d5ed0c8a781..1b5faa6f1bef 100644
--- a/packages/docs-reanimated/src/components/AvailableFrom/styles.module.css
+++ b/packages/docs-reanimated/src/components/AvailableFrom/styles.module.css
@@ -1,7 +1,5 @@
.badge {
display: inline-block;
- background-color: var(--swm-purple-light-40);
- color: var(--swm-navy-light-100);
border-radius: 8px;
font-size: 12px;
font-weight: 500;
@@ -10,19 +8,34 @@
margin: 0 0.25rem;
}
-.info {
- margin-right: 1rem;
-}
-.version {
- font-weight: 500;
-}
-
-.big {
+.fullBadge {
padding: 1rem;
width: '100%';
border-radius: 8px;
- background-color: var(--swm-purple-light-20);
display: flex !important;
flex-direction: row;
margin-bottom: 1rem;
}
+
+.light {
+ background-color: var(--swm-yellow-light-40);
+ color: var(--swm-navy-light-100);
+}
+
+.dark {
+ background-color: var(--swm-yellow-dark-120);
+ color: var(--swm-off-white);
+}
+
+.infoIcon {
+ margin-right: 1rem;
+}
+
+.infoIcon > svg {
+ width: 14px;
+ height: 14px;
+}
+
+.version {
+ font-weight: 500;
+}