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

Referencing values with refs #25

Merged
merged 11 commits into from
May 19, 2023
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
14 changes: 7 additions & 7 deletions src/components/MDX/Challenges/Challenge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ export function Challenge({
<div>
<Button className="mr-2" onClick={toggleHint} active={showHint}>
<IconHint className="mr-1.5" />{' '}
{showHint ? 'Hide hint' : 'Show hint'}
{showHint ? 'হিন্ট লুকান' : 'হিন্ট দেখান'}
</Button>
<Button
className="mr-2"
onClick={toggleSolution}
active={showSolution}>
<IconSolution className="mr-1.5" />{' '}
{showSolution ? 'Hide solution' : 'Show solution'}
{showSolution ? 'সমাধান লুকান' : 'সমাধান দেখান'}
</Button>
</div>
) : (
Expand All @@ -80,7 +80,7 @@ export function Challenge({
onClick={toggleSolution}
active={showSolution}>
<IconSolution className="mr-1.5" />{' '}
{showSolution ? 'Hide solution' : 'Show solution'}
{showSolution ? 'সমাধান লুকান' : 'সমাধান দেখান'}
</Button>
)
)}
Expand All @@ -94,7 +94,7 @@ export function Challenge({
)}
onClick={handleClickNextChallenge}
active>
Next {isRecipes ? 'Example' : 'Challenge'}
পরবর্তী {isRecipes ? 'উদাহরণ' : 'চ্যালেঞ্জ'}
<IconArrowSmall displayDirection="right" className="block ml-1.5" />
</Button>
)}
Expand All @@ -104,12 +104,12 @@ export function Challenge({
{showSolution && (
<div className="mt-6">
<h3 className="text-2xl font-bold text-primary dark:text-primary-dark">
Solution
সমাধান
</h3>
{currentChallenge.solution}
<div className="flex justify-between items-center mt-4">
<Button onClick={() => setShowSolution(false)}>
Close solution
সমাধান বন্ধ করুন
</Button>
{hasNextChallenge && (
<Button
Expand All @@ -118,7 +118,7 @@ export function Challenge({
)}
onClick={handleClickNextChallenge}
active>
Next Challenge
পরবর্তী চ্যালেঞ্জ
<IconArrowSmall
displayDirection="right"
className="block ml-1.5"
Expand Down
6 changes: 4 additions & 2 deletions src/components/MDX/Challenges/Challenges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ export function Challenges({
children,
isRecipes,
noTitle,
titleText = isRecipes ? 'Try out some examples' : 'Try out some challenges',
titleId = isRecipes ? 'examples' : 'challenges',
titleText = isRecipes
? 'কিছু উদাহরণ চেষ্টা করে দেখুন'
: 'নিজেকে কিছু চ্যালেঞ্জ করে দেখুন',
titleId = isRecipes ? 'কিছু উদাহরণ' : 'কিছু চ্যালেঞ্জ',
}: ChallengesProps) {
const challenges = parseChallengeContents(children);
const totalChallenges = challenges.length;
Expand Down
2 changes: 1 addition & 1 deletion src/components/MDX/Sandpack/CustomPreset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const SandboxShell = memo(function SandboxShell({
className="inline mr-1.5 text-xl"
displayDirection={isExpanded ? 'up' : 'down'}
/>
{isExpanded ? 'Show less' : 'Show more'}
{isExpanded ? 'কম দেখান' : 'আরো দেখান'}
</span>
</button>
)}
Expand Down
Loading