Last active
July 18, 2021 20:22
-
-
Save jasonleehodges/5baa769e79873875ded66b856ddac731 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { status, labels } from './status'; | |
export const Badge = (props) => { | |
return ( | |
<div style={ | |
{backgroundColor: props.status === status.active ? 'green' : 'red'} | |
}> | |
{labels.statusPrompt[props.language]}: {props.status} | |
</div> | |
); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const status = { | |
active: 'Ready', | |
inactive: 'Inactive' | |
} | |
export const labels = { | |
statusPrompt: { | |
'en-US': 'Status', | |
'fr-FR': 'Statut', | |
}, | |
welcomeMessage: { | |
'en-US': 'Welcome to this website!', | |
'fr-FR': 'Bienvenue sur ce site!', | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment