Skip to content

Commit

Permalink
Updated the card
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya Bikram Thakur committed Jul 8, 2024
1 parent 3952e6d commit a77e29d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
9 changes: 0 additions & 9 deletions nepalingo-web/src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
import React from 'react';
import styles from './header.module.css';
import Card from './card/Card'
const Header: React.FC = () => {
return (
<div className={styles.container}>
<header className={styles.header}>
<h1 className="text-3xl font-bold underline">Hello, World!</h1>
</header>
<Card
Word="Example"
TranslatedWord="उदाहरण"
Pronunciation="udāharaṇa"
DevenagiriSpelling="उदाहरण"
ImageUrl="https://d38b044pevnwc9.cloudfront.net/cutout-nuxt/enhancer/2.jpg" // Replace with your image URL
PronounciationUrl="https://example.com/sound.mp3" // Replace with your sound URL
/>
</div>
);
};
Expand Down
21 changes: 21 additions & 0 deletions nepalingo-web/src/components/button/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React, { forwardRef } from 'react';

interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {

}

const Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
const { className, children, ...rest } = props;

const buttonClasses = `bg-blue-500 hover:md:bg-opacity-80 text-white font-bold py-2 px-4 rounded ${className}`;

return (
<button ref={ref} className={buttonClasses} {...rest}>
{children}
</button>
);
});

Button.displayName = 'Button';

export default Button;
2 changes: 1 addition & 1 deletion nepalingo-web/src/components/card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Card: React.FC<{
<p className="absolute right-10 top-36 text-xs">{Pronunciation}</p>
{PronounciationUrl && (
<button onClick={handlePronunciation} className="absolute right-10 bottom-10">
{/* <FontAwesomeIcon icon="fa-solid fa-volume-high" /> */}
<FontAwesomeIcon icon="fa-solid fa-volume-high" />
</button>
)}
</div>
Expand Down

0 comments on commit a77e29d

Please sign in to comment.