1
0
Fork 0

[react] feat: Added docs for components/Account

This commit is contained in:
joostdecock 2025-05-09 17:46:51 +02:00
parent f5a089f884
commit 6d9cbf55c2
37 changed files with 665 additions and 277 deletions

View file

@ -1,6 +1,14 @@
import React from 'react'
import { KeyVal } from '@freesewing/react/components/KeyVal'
/**
* Displays a badge for the account status you pass it
*
* @component
* @param {object} props - All component props
* @param {number} props.status - The account status. One of -2, -1, 0, or 1
* @returns {JSX.Element}
*/
export const AccountStatus = ({ status }) => {
if (status === 0) return <AccountInactive />
if (status === 1) return <AccountActive />