feat(shared): Updated MDX components
This commit is contained in:
parent
4edfe29726
commit
aa5463301e
6 changed files with 2278 additions and 136 deletions
19
sites/shared/components/mdx/status-code.js
Normal file
19
sites/shared/components/mdx/status-code.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
const statusClasses = {
|
||||
2: 'bg-green-600 text-white',
|
||||
4: 'bg-orange-500 text-white',
|
||||
5: 'bg-red-600 text-white',
|
||||
}
|
||||
|
||||
const StatusCode = ({ status }) => {
|
||||
return (
|
||||
<div
|
||||
className={`my-1 text-xs inline-flex items-center font-bold leading-sm uppercase px-3 py-1 rounded-full ${
|
||||
statusClasses['' + status.slice(0, 1)]
|
||||
}`}
|
||||
>
|
||||
{status}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default StatusCode
|
Loading…
Add table
Add a link
Reference in a new issue