DemocracyLab / DemocracyLab/CivicTechExchange
VAR Card Intro Component
- Dominant language
- JavaScript
- Stars
- 105
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
### VAR Card Intro
**Figma:** [Var Card Intro](https://www.figma.com/design/WADcmVjJh5ARVoZ09xlpfdFN/DemocracyLab?node-id=39337-90134&t=deWirqbNmFVIPX40-4)
**Location**
- **Component File:**
common/components/componentsBySection/VolunteerActivityReporting/VolunteerActivityReportingCardIntro.jsx
- **Storybook File:**
common/components/componentsBySection/VolunteerActivityReporting/stories/VolunteerActivityReportingCardIntro.stories.jsx
- **Styles (SCSS):**
civictechprojects/static/css/partials/_VolunteerActivityReportingCardIntro.scss
```
({ logActivity: false })}
/>
```
_projectName_ (string): Displays the project name.
_logActivity_ (boolean):
If true, shows the log activity toggle and placeholder message "Log activity for this project"
If false, displays placeholder message "No activity to log"
_onUpdate(function)_: Called when user toggles the logActivity UI state.
Should return
```
{logActivity: boolean}
```
- Displays project name dynamically based on projectName.
- Shows log activity option when logActivity is true.
- Should have no extra margin; spacing should be handled by the parent.
#### Test Cases in Storybook:
**Default State:** Displays project name and log activity toggle.
**No Activity:** Displays placeholder message when logActivity = false.
**Interaction:** Ensures toggle changes state correctly.
Contributor guide
Assessment
This issue has not been assessed yet.