Skip to content

Commit 89671ac

Browse files
committed
fix : added the pill
1 parent fda8a19 commit 89671ac

2 files changed

Lines changed: 63 additions & 0 deletions

File tree

src/new-components/Navbar.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import FigmaIcon from "../icons/FigmaIcon";
3535
import GeekyantsLogo from "./GeekyantsLogo";
3636
import AlgoliaSearchButton from "./AlgoliaSearchButton";
3737
import { parentUrl } from "../../docs.config";
38+
import RapidNativePill from "../rapidnative-components/RapidnativePill";
3839

3940
export default function Navbar(props: any) {
4041
const { activeVersion, setActiveVersion } = useContext(AppContext);
@@ -179,6 +180,7 @@ export default function Navbar(props: any) {
179180
);
180181
})}
181182
</Menu>
183+
<RapidNativePill/>
182184
{/* <NBLink
183185
display={{ base: "none", xl: "flex" }}
184186
href="https://startup.nativebase.io/?utm_source=DocsHeader&utm_medium=ad-banner&utm_campaign=NativeBase_3_Docs"
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import React, { useState } from 'react';
2+
import { TouchableOpacity, Text, View, Linking } from 'react-native';
3+
4+
const RapidnativePill = () => {
5+
const [isPressed, setIsPressed] = useState(false);
6+
const [isHovered, setIsHovered] = useState(false);
7+
8+
const handlePress = () => {
9+
Linking.openURL('https://rapidnative.com');
10+
};
11+
12+
return (
13+
<TouchableOpacity
14+
onPress={handlePress}
15+
onPressIn={() => setIsPressed(true)}
16+
onPressOut={() => setIsPressed(false)}
17+
onMouseEnter={() => setIsHovered(true)}
18+
onMouseLeave={() => setIsHovered(false)}
19+
// backgroundColor: isPressed ? '#0891b2' : isHovered ? '#0e7490' : '#06b6d4',
20+
// backgroundColor: isPressed ? '##0891b2' : isHovered ? '#06b6d4' : '#0891b2',
21+
style={{
22+
backgroundColor: isPressed ? '##0891b2' : isHovered ? '#0891b2' : '#06b6d4',
23+
paddingHorizontal: 12,
24+
paddingVertical: 6,
25+
borderRadius: 20,
26+
flexDirection: 'row',
27+
alignItems: 'center',
28+
justifyContent: 'center',
29+
shadowColor: '#000',
30+
shadowOffset: { width: 0, height: 1 },
31+
shadowOpacity: isHovered ? 0.15 : 0.1,
32+
shadowRadius: isHovered ? 3 : 2,
33+
elevation: isHovered ? 3 : 2,
34+
transform: [{ scale: isPressed ? 0.98 : isHovered ? 1.02 : 1 }],
35+
transition: 'all 0.2s ease',
36+
}}
37+
>
38+
<Text
39+
style={{
40+
color: '#ffffff',
41+
fontSize: 14,
42+
fontWeight: '500',
43+
marginRight: 4,
44+
}}
45+
>
46+
Prompt to React Native UI
47+
</Text>
48+
<Text
49+
style={{
50+
color: '#ffffff',
51+
fontSize: 12,
52+
fontWeight: '400',
53+
}}
54+
>
55+
56+
</Text>
57+
</TouchableOpacity>
58+
);
59+
};
60+
61+
export default RapidnativePill;

0 commit comments

Comments
 (0)