diff --git a/src/components/recipe-card/RecipeCard.tsx b/src/components/recipe-card/RecipeCard.tsx index 39bccb0..de309eb 100644 --- a/src/components/recipe-card/RecipeCard.tsx +++ b/src/components/recipe-card/RecipeCard.tsx @@ -1,4 +1,5 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import classes from './recipe-card.module.css' export interface RecipeCardProps { title: string @@ -18,22 +19,23 @@ const RecipeCard = ({ isPublic }: RecipeCardProps) => { return ( -
- {mainImageAlt} -
-

{title}

+
+ {mainImageAlt} +
+

{title}

{starCount} -
-
{ownerUsername} -
-
{isPublic ? ( ) : ( diff --git a/src/components/recipe-card/recipe-card.module.css b/src/components/recipe-card/recipe-card.module.css new file mode 100644 index 0000000..25610a9 --- /dev/null +++ b/src/components/recipe-card/recipe-card.module.css @@ -0,0 +1,18 @@ +.recipe-card { + max-width: 400px; + border: 1px solid black; +} + +.recipe-image { + max-width: 100%; +} + +.info-container { + display: grid; + grid-template-columns: repeat(2, 1fr); + align-items: baseline; +} + +.title { + margin-block: 0; +} diff --git a/vite.config.ts b/vite.config.ts index 7ea7628..55de3ed 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,5 +4,10 @@ import { TanStackRouterVite } from '@tanstack/router-vite-plugin' // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react(), TanStackRouterVite()] + plugins: [react(), TanStackRouterVite()], + css: { + modules: { + localsConvention: 'camelCaseOnly' + } + } })