Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translate Your First Component (beta docs) #516

Merged
merged 4 commits into from
Apr 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions beta/src/components/MDX/Challenges/Challenges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const parseChallengeContents = (
export function Challenges({
children,
isRecipes,
titleText = isRecipes ? 'Try out some examples' : 'Try out some challenges',
titleText = isRecipes ? 'Prueba algunos ejemplos' : 'Prueba algunos desafíos',
titleId = isRecipes ? 'examples' : 'challenges',
}: ChallengesProps) {
const challenges = parseChallengeContents(children);
Expand Down Expand Up @@ -143,8 +143,8 @@ export function Challenges({
<div key={activeChallenge}>
<h3 className="text-xl text-primary dark:text-primary-dark mb-2">
<div className="font-bold block md:inline">
{isRecipes ? 'Example' : 'Challenge'} {currentChallenge.order}{' '}
of {challenges.length}
{isRecipes ? 'Ejemplo' : 'Desafío'} {currentChallenge.order} of{' '}
{challenges.length}
<span className="text-primary dark:text-primary-dark">: </span>
</div>
{currentChallenge.name}
Expand All @@ -156,14 +156,14 @@ export function Challenges({
<div>
<Button className="mr-2" onClick={toggleHint} active={showHint}>
<IconHint className="mr-1.5" />{' '}
{showHint ? 'Hide hint' : 'Show hint'}
{showHint ? 'Ocultar pista' : 'Mostrar pista'}
</Button>
<Button
className="mr-2"
onClick={toggleSolution}
active={showSolution}>
<IconSolution className="mr-1.5" />{' '}
{showSolution ? 'Hide solution' : 'Show solution'}
{showSolution ? 'Ocultar solución' : 'Mostrar solución'}
</Button>
</div>
) : (
Expand All @@ -173,7 +173,7 @@ export function Challenges({
onClick={toggleSolution}
active={showSolution}>
<IconSolution className="mr-1.5" />{' '}
{showSolution ? 'Hide solution' : 'Show solution'}
{showSolution ? 'Ocultar solución' : 'Mostrar solución'}
</Button>
)
)}
Expand All @@ -190,7 +190,7 @@ export function Challenges({
setShowSolution(false);
}}
active>
Next {isRecipes ? 'Example' : 'Challenge'}
Próximo {isRecipes ? 'ejemplo' : 'desafío'}
<IconArrowSmall
displayDirection="right"
className="block ml-1.5"
Expand All @@ -203,12 +203,12 @@ export function Challenges({
{showSolution && (
<div className="mt-6">
<h3 className="text-2xl font-bold text-primary dark:text-primary-dark">
Solution
Solución
</h3>
{currentChallenge.solution}
<div className="flex justify-between items-center mt-4">
<Button onClick={() => setShowSolution(false)}>
Close solution
Cerrar solución
</Button>
{nextChallenge && (
<Button
Expand All @@ -226,7 +226,7 @@ export function Challenges({
}
}}
active>
Next Challenge
Próximo desafío
<IconArrowSmall
displayDirection="right"
className="block ml-1.5"
Expand Down
4 changes: 2 additions & 2 deletions beta/src/components/MDX/ExpandableCallout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface ExpandableCalloutProps {

const variantMap = {
note: {
title: 'Note',
title: 'Nota',
Icon: IconNote,
containerClasses:
'bg-green-5 dark:bg-green-60 dark:bg-opacity-20 text-primary dark:text-primary-dark text-lg',
Expand All @@ -25,7 +25,7 @@ const variantMap = {
'linear-gradient(rgba(245, 249, 248, 0), rgba(245, 249, 248, 1)',
},
gotcha: {
title: 'Pitfall',
title: 'Atención',
Icon: IconGotcha,
containerClasses: 'bg-yellow-5 dark:bg-yellow-60 dark:bg-opacity-20',
textColor: 'text-yellow-50 dark:text-yellow-40',
Expand Down
2 changes: 1 addition & 1 deletion beta/src/components/MDX/Recap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Recap({children}: RecapProps) {
return (
<section>
<H2 isPageAnchor id="recap">
Recap
Recapitulación
</H2>
{children}
</section>
Expand Down
Loading