Skip to content

Instantly share code, notes, and snippets.

View AlanGreyjoy's full-sized avatar
💭
I may be slow to respond.

Alan Spurlock AlanGreyjoy

💭
I may be slow to respond.
View GitHub Profile
@AlanGreyjoy
AlanGreyjoy / gist:2d937569aca4457957927cf888329df9
Created August 17, 2024 05:37
Dead Simple React Native Collapsible Card (RNUILIB & Iconify)
import { useState } from 'react'
import { Iconify } from 'react-native-iconify'
import { Card, Text, TouchableOpacity, View } from 'react-native-ui-lib'
export default function CollapsibleCard(props) {
const defaultExpanded = props.defaultExpanded || false
const title = props.title || 'Title'
const [expanded, setExpanded] = useState(defaultExpanded)
@AlanGreyjoy
AlanGreyjoy / gist:3a870eef6a65a4c2b9a2cd959289376a
Created August 17, 2024 02:24
Dead simple React Native Expandable View (RNUILIB & ICONIFY)
import { useState } from 'react'
import { Iconify } from 'react-native-iconify'
import { Colors, Text, TouchableOpacity, View } from 'react-native-ui-lib'
export default function ExpandableView(props) {
const title = props.title || 'Expandable View'
const defaultExpanded = props.defaultExpanded || false
const divider = props.divider || false
const [expanded, setExpanded] = useState(defaultExpanded || false)