Skip to content

Commit

Permalink
feat: custom styling and content (#217)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladislav Zimnikov <[email protected]>
Co-authored-by: juliusmarminge <[email protected]>
  • Loading branch information
3 people authored Aug 15, 2023
1 parent d6c57fc commit 0a92cf3
Show file tree
Hide file tree
Showing 28 changed files with 1,680 additions and 371 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-carpets-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@uploadthing/react": minor
---

feat(react): content and styling customisation
11 changes: 8 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@
"debug": "NODE_OPTIONS='--inspect' next dev"
},
"dependencies": {
"@uploadthing/react": "5.2.1",
"next": "13.4.4",
"nextra": "^2.7.0",
"nextra-theme-docs": "^2.7.0",
"react": "18.2.0",
"react-dom": "18.2.0"
"react-dom": "18.2.0",
"uploadthing": "5.3.2"
},
"devDependencies": {
"@types/react": "18.2.8",
"@types/react-dom": "18.2.4"
"@types/react-dom": "18.2.4",
"autoprefixer": "10.4.14",
"postcss": "8.4.22",
"tailwindcss": "^3.3.2"
}
}
}
6 changes: 6 additions & 0 deletions docs/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Binary file added docs/public/upload-button-anatomy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/upload-dropzone-anatomy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions docs/src/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

/* applied to container */
.custom-class {
background-color: none;
}

/* applied to button */
.custom-class > *[data-ut-element="button"] {
font-size: 1.6rem;
color: rgb(0 0 0 / 1);
background-color: rgb(239 68 68 / 1);
}

/* applied to button when uploading */
.custom-class > *[data-ut-element="button"][data-state="readying"] {
background-color: rgb(239 68 68 / 0.5);
color: rgb(0 0 0 / 0.5);
cursor: not-allowed;
}

/* applied to button when uploading */
.custom-class > *[data-ut-element="button"][data-state="uploading"] {
background-color: rgb(239 68 68 / 0.5);
color: rgb(0 0 0 / 0.5);
cursor: not-allowed;
}

/* applied to upload indicator when uploading */
.custom-class > *[data-ut-element="button"][data-state="uploading"]::after {
background-color: rgb(234 88 12 / 1);
}

/* applied to container */
.custom-container {
background-color: none;
margin-top: 1rem;
}

/* applied to container when readying */
.custom-container[data-state="readying"] {
background-color: none;
}

/* applied to button */
.custom-button {
font-size: 1.6rem;
color: rgb(0 0 0 / 1);
background-color: rgb(239 68 68 / 1);
}

/* applied to button when uploading */
.custom-button-uploading {
background-color: rgb(239 68 68 / 0.5);
color: rgb(0 0 0 / 0.5);
cursor: not-allowed;
}

.custom-button-uploading::after {
background-color: rgb(234 88 12 / 1) !important;
}

/* applied to button when ready */
.custom-button-ready {
color: #ecfdf5;
}

/* applied to button when not ready */
.custom-button-not-ready {
background-color: rgb(239 68 68 / 0.5);
color: rgb(0 0 0 / 0.5);
cursor: not-allowed;
}
2 changes: 2 additions & 0 deletions docs/src/pages/_app.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import "../globals.css";

export default function App({ Component, pageProps }) {
return <Component {...pageProps} />;
}
9 changes: 5 additions & 4 deletions docs/src/pages/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@
"getting-started": "Getting Started",
"nextjs": "Next.js Setup",
"solid": "SolidStart Setup",
"theming": "Theming",
"faq": {
"title": "Frequently Asked Questions (FAQ)",
"theme": { "toc": false }
"theme": {
"toc": false
}
},
"api-reference": "API Reference",
"errors": "Error Handling",

"roadmap": {
"title": "Roadmap",
"href": "https://t3-tools.notion.site/776334c06d814dd08d450975bb983085?v=a04ee69d18a047859717b279df504a6b",
"newWindow": true
},

"project-link": {
"title": "Dashboard ↗",
"type": "page",
"href": "https://uploadthing.com/dashboard",
"newWindow": true
}
}
}
Loading

1 comment on commit 0a92cf3

@vercel
Copy link

@vercel vercel bot commented on 0a92cf3 Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.