import React, { useState, useContext } from 'react'; import { Card, Accordion, Col, AccordionContext, useAccordionToggle } from 'react-bootstrap'; import styled from 'styled-components'; const Text = styled(Card.Body)` & .WRAP { display: inline-block; text-overflow: ellipsis; width: 100%; white-space: initial; } ` function Notice({ card_index, title, date, content }) { function ContextAwareToggle({ children, eventKey, callback }) { const currentEventKey = useContext(AccordionContext); const decoratedOnClick = useAccordionToggle( eventKey, () => callback && callback(eventKey), ); const isCurrentEventKey = currentEventKey === eventKey; return (
{content}