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

Add Tailwind #11

Open
wants to merge 1 commit into
base: add-challenge-type-refactor
Choose a base branch
from
Open
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
21 changes: 16 additions & 5 deletions packages/web/components/create/ChallengeTypeScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const placeholderChallengeType = {

const ChallengeTypeScreen = (props) => {
return (
<div>
<div className="bg-white/10 p-10 rounded w-full max-w-4xl backdrop-blur-sm">
<Formik
initialValues={{
name: '',
Expand All @@ -32,7 +32,7 @@ const ChallengeTypeScreen = (props) => {
const price = utils.parseEther(prtclePrice).toString();
const quantity = utils.parseEther(maxQuantity).toString();
const total = utils.parseEther(totalQuantity).toString();

await props.addChallengeTypes([
{
name,
Expand All @@ -47,19 +47,28 @@ const ChallengeTypeScreen = (props) => {
actions.setSubmitting(false);
}}
>
<FormFrame>
<Field id="name" name="name" placeholder="Challenge Title" />
<FormFrame className="flex flex-col gap-8">
<Field
className="py-4 px-8 text-gray-800 rounded"
id="name"
name="name"
placeholder="Challenge Title"
/>
<Field
id="description"
name="description"
placeholder="Enter Description"
className="py-4 px-8 text-gray-800 rounded"
>
{({ field, form, meta }) => {
return (
<TextArea
name="description"
value={field.value}
onChange={field.onChange}
placeholder="Description"
style={{ resize: 'none' }}
className="py-4 px-8 text-gray-800 rounded min-h-xl"
/>
);
}}
Expand All @@ -68,16 +77,19 @@ const ChallengeTypeScreen = (props) => {
id="prtclePrice"
name="prtclePrice"
placeholder="Starting Price (in Particle)"
className="py-4 px-8 text-gray-800 rounded"
/>
<Field
id="maxQuantity"
name="maxQuantity"
placeholder="Max quantity"
className="py-4 px-8 text-gray-800 rounded"
/>
<Field
id="totalQuantity"
name="totalQuantity"
placeholder="Total Quantity"
className="py-4 px-8 text-gray-800 rounded"
/>
<button type="submit">Next</button>
</FormFrame>
Expand All @@ -95,5 +107,4 @@ const FormFrame = styled(Form)`
flex-direction: column;
justify-content: space-around;
align-items: space-around;
height: 200px;
`;
3 changes: 3 additions & 0 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@
"web3modal": "^1.9.4"
},
"devDependencies": {
"autoprefixer": "^10.4.2",
"eslint": "7.32.0",
"eslint-config-next": "12.0.3",
"key-did-provider-ed25519": "^1.1.0",
"key-did-resolver": "^1.4.0",
"postcss": "^8.4.5",
"tailwindcss": "^3.0.15",
"uint8arrays": "^3.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/web/pages/mint.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ const Main = styled.main`
justify-content: space-around;
align-items: center;
flex-direction: column;
height: 100vh;
min-height: 100vh;
position: relative;
`;

const FormFrame = styled.form`
display: flex;
flex-direction: column;
height: 150px;
/* height: 150px; */
justify-content: space-around;
`;

Expand Down
6 changes: 6 additions & 0 deletions packages/web/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
36 changes: 20 additions & 16 deletions packages/web/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800&family=Open+Sans&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

*,
*::after,
*::before {
margin: 0;
padding: 0;
box-sizing: inherit;
margin: 0;
padding: 0;
box-sizing: inherit;
}

html {
font-size: 62.5%;
font-size: 62.5%;
}

body {
background-color: #1a181a;
color: #f5f3f5;
font-family: 'Open Sans', sans-serif;
box-sizing: border-box;
font-size: 1.7rem;
line-height: 1.5;
background-color: #1a181a;
color: #f5f3f5;
font-family: 'Open Sans', sans-serif;
box-sizing: border-box;
font-size: 1.7rem;
line-height: 1.5;
}

a {
color: inherit;
text-decoration: none;
color: inherit;
text-decoration: none;
}

* {
box-sizing: border-box;
box-sizing: border-box;
}

h1,
Expand All @@ -36,7 +40,7 @@ h3,
h4,
h5,
h6 {
font-family: 'Montserrat', sans-serif;
line-height: 1.2;
color: white;
font-family: 'Montserrat', sans-serif;
line-height: 1.2;
color: white;
}
10 changes: 10 additions & 0 deletions packages/web/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
'./components/**/*.{js,ts,jsx,tsx}',
],
theme: {
extend: {},
},
plugins: [],
};
Loading