MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / PracticeCard

Function PracticeCard

frontend/src/components/practice/PracticeCard.tsx:11–44  ·  view source on GitHub ↗
({ card, isFlipped, onFlip }: PracticeCardProps)

Source from the content-addressed store, hash-verified

9}
10
11function PracticeCard({ card, isFlipped, onFlip }: PracticeCardProps) {
12 const commonCardStyles = {
13 padding: '1rem',
14 position: 'absolute' as const,
15 width: '100%',
16 height: '100%',
17 backfaceVisibility: 'hidden' as const,
18 borderRadius: 'lg',
19 borderWidth: '1px',
20 borderColor: 'bg.200',
21 cursor: 'pointer',
22 }
23
24 return (
25 <Box
26 onClick={onFlip}
27 position="relative"
28 height="100%"
29 width="100%"
30 style={{ perspective: '1000px' }}
31 transition="transform 0.3s ease"
32 transformStyle="preserve-3d"
33 transform={isFlipped ? 'rotateY(180deg)' : 'rotateY(0)'}
34 >
35 <Box {...commonCardStyles} bg="bg.50">
36 <RichTextContent content={card.front} isVisible={!isFlipped} />
37 </Box>
38
39 <Box {...commonCardStyles} bg="bg.100" transform="rotateY(180deg)">
40 <RichTextContent content={card.back} isVisible={isFlipped} />
41 </Box>
42 </Box>
43 )
44}
45
46export default PracticeCard

Callers 2

_create_practice_cardsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected