Skip to content

Commit

Permalink
Merge pull request #20 from T1xx1/v2
Browse files Browse the repository at this point in the history
Better components UIs
  • Loading branch information
T1xx1 authored Oct 5, 2024
2 parents 3a026f1 + 48a6bdb commit 165df91
Show file tree
Hide file tree
Showing 134 changed files with 1,947 additions and 1,663 deletions.
8 changes: 4 additions & 4 deletions components.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"rsc": false,
"tsx": true,
"tailwind": {
"config": "./src/shadcn/tailwind.congif.js",
"css": "./src/styles/index.scss",
"config": "./src/components/shadcn/tailwind.congif.js",
"css": "./src/styles/index.css",
"baseColor": "slate",
"cssVariables": false,
"prefix": ""
},
"aliases": {
"components": "~/shadcn",
"utils": "~/shadcn/utils"
"components": "~/components/shadcn",
"utils": "~/components/shadcn/utils"
}
}
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,27 @@
"build": "astro check && astro build"
},
"devDependencies": {
"@astrojs/check": "^0.9.2",
"@astrojs/check": "^0.9.3",
"@astrojs/react": "^3.6.2",
"@astrojs/svelte": "^5.7.0",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vercel": "^7.7.2",
"@astrojs/svelte": "^5.7.1",
"@astrojs/tailwind": "^5.1.1",
"@astrojs/vercel": "^7.8.1",
"@radix-ui/react-slider": "^1.2.0",
"@radix-ui/react-switch": "^1.1.0",
"@types/react": "^18.3.3",
"@types/react": "^18.3.8",
"@types/react-dom": "^18.3.0",
"astro": "^4.14.2",
"astro": "^4.15.8",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-react": "^0.428.0",
"lucide-react": "^0.441.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sass": "^1.77.8",
"sharp": "^0.33.5",
"svelte": "^4.2.18",
"svelte": "^4.2.19",
"tailwind-merge": "^2.5.2",
"tailwindcss": "^3.4.10",
"tailwindcss": "^3.4.12",
"tailwindcss-animate": "^1.0.7",
"tslib": "^2.6.3",
"typescript": "^5.5.4"
"tslib": "^2.7.0",
"typescript": "^5.6.2"
}
}
1,361 changes: 680 additions & 681 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Binary file modified public/favicon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 0 additions & 13 deletions src/assets/house.svg

This file was deleted.

Binary file added src/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/components/bg.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
type Props = {
twBgColor: string;
};
const { twBgColor } = Astro.props;
---

<div class={`bg-opacity-50 rounded-xl p-5 h-full w-full flex items-center justify-center ${twBgColor}`}>
<slot />
</div>
11 changes: 11 additions & 0 deletions src/components/card.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
type Props = {
styles?: string;
};
const { styles } = Astro.props;
---

<div class={`border-2 rounded-xl shadow ${styles}`}>
<slot />
</div>
23 changes: 23 additions & 0 deletions src/components/counter.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
import Card from './card.astro';
import H2 from './h2.astro';
const { val } = Astro.props;
---

<Card styles="m-auto px-5 py-2 w-fit flex flex-col items-center">
<H2 styles="text-accent">UIs counter</H2>

<div class="text-accent font-semibold">{val} / 100</div>

<meter
max="100"
value={val}
class="h-10 w-[25rem]"></meter>
</Card>

<style>
meter::-webkit-meter-optimum-value {
@apply bg-accent;
}
</style>
11 changes: 11 additions & 0 deletions src/components/h2.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
type Props = {
styles?: string;
};
const { styles } = Astro.props;
---

<h2 class={`text-4xl font-semibold ${styles}`}>
<slot />
</h2>
11 changes: 11 additions & 0 deletions src/components/h3.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
type Props = {
styles?: string;
};
const { styles } = Astro.props;
---

<h3 class={`text-2xl font-semibold ${styles}`}>
<slot />
</h3>
12 changes: 12 additions & 0 deletions src/components/link.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
type Props = {
url: string;
styles?: string;
};
const { url, styles = '' } = Astro.props;
---

<a href={url} class={`text-accent hover:underline ${styles}`}>
<slot />
</a>
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions src/components/title.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
import { Image } from 'astro:assets';
import icon from '~/assets/icon.png';
type Props = {
styles?: string;
};
const { styles = "" } = Astro.props;
---

<div class={`flex gap-2.5 items-center ${styles}`}>
<Image src={icon} alt="Icon" class="h-9 w-9" />

<div class="text-primary text-3xl font-semibold">100FrontendChallenge</div>
</div>
53 changes: 0 additions & 53 deletions src/content/components/addtocart/index.astro

This file was deleted.

68 changes: 0 additions & 68 deletions src/content/components/contactus/index.astro

This file was deleted.

Binary file removed src/content/components/createaccount/bg.png
Binary file not shown.
58 changes: 0 additions & 58 deletions src/content/components/createaccount/index.astro

This file was deleted.

Loading

0 comments on commit 165df91

Please sign in to comment.