1
0
Fork 0
freesewing/packages/react/components/Account/Role.mjs

13 lines
382 B
JavaScript
Raw Normal View History

import React from 'react'
import { KeyVal } from '@freesewing/react/components/KeyVal'
export const UserRole = ({ role }) => {
if (role === 'user') return <RoleUser />
if (role === 'admin') return <RoleAdmin />
return <b>fixme</b>
}
const RoleUser = () => <KeyVal k="role" val="user" color="success" />
const RoleAdmin = () => <KeyVal k="role" val="admin" color="error" />