Skip to content

Commit

Permalink
fix: re-enable tailwind base class on extension popup (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
doaortu authored Apr 25, 2023
1 parent f4f8cf6 commit c081217
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 15 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logoIcon from "../../assets/opensauced-icon.svg";
import "../../index.css";
import { createHtmlElement } from "../../utils/createHtmlElement";
import logoIcon from "../../../assets/opensauced-icon.svg";
import "../../content-scripts.css";
import { createHtmlElement } from "../../../utils/createHtmlElement";

export const InviteToOpenSaucedButton = () => {
const inviteToOpenSaucedButton = createHtmlElement("a", {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import "../../index.css";
import { createHtmlElement } from "../../utils/createHtmlElement";
import emailSocialIcon from "../../assets/mail-icon.svg";
import twitterSocialIcon from "../../assets/twitter-icon.svg";
import linkedInSocailIcon from "../../assets/linkedin-icon.svg";
import "../../content-scripts.css";
import { createHtmlElement } from "../../../utils/createHtmlElement";
import emailSocialIcon from "../../../assets/mail-icon.svg";
import twitterSocialIcon from "../../../assets/twitter-icon.svg";
import linkedInSocailIcon from "../../../assets/linkedin-icon.svg";

interface Socials {
emailAddress?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logoIcon from "../../assets/opensauced-icon.svg";
import "../../index.css";
import { createHtmlElement } from "../../utils/createHtmlElement";
import logoIcon from "../../../assets/opensauced-icon.svg";
import "../../content-scripts.css";
import { createHtmlElement } from "../../../utils/createHtmlElement";

export const ViewOnOpenSaucedButton = (username: string) => {
const viewOnOpenSaucedButton = createHtmlElement("a", {
Expand Down
27 changes: 27 additions & 0 deletions src/content-scripts/content-scripts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
style for content-scripts
not using tailwindcss base styles because it's interfering with the github page styles
*/

@tailwind components;
@tailwind utilities;

* {
box-sizing: border-box;
margin: 0px;
padding: 0px;
}

body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App'
import './index.css'
import './popup.css'

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
Expand Down
23 changes: 23 additions & 0 deletions src/popup.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

* {
box-sizing: border-box;
margin: 0px;
padding: 0px;
}

body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
4 changes: 2 additions & 2 deletions src/utils/dom-utils/inviteToOpenSauced.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { InviteToOpenSaucedButton } from "../../components/InviteToOpenSauced/InviteToOpenSaucedButton";
import { InviteToOpenSaucedModal } from "../../components/InviteToOpenSauced/InviteToOpenSaucedModal";
import { InviteToOpenSaucedButton } from "../../content-scripts/components/InviteToOpenSauced/InviteToOpenSaucedButton";
import { InviteToOpenSaucedModal } from "../../content-scripts/components/InviteToOpenSauced/InviteToOpenSaucedModal";
import { getTwitterUsername, getLinkedInUsername } from "../urlMatchers";

const injectOpenSaucedInviteButton = (username: string) => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/dom-utils/viewOnOpenSauced.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ViewOnOpenSaucedButton } from "../../components/ViewOnOpenSaucedButton/ViewOnOpenSaucedButton";
import { ViewOnOpenSaucedButton } from "../../content-scripts/components/ViewOnOpenSaucedButton/ViewOnOpenSaucedButton";

const injectViewOnOpenSaucedButton = (username: string) => {
const viewOnOpenSaucedButton = ViewOnOpenSaucedButton(username);
Expand Down

0 comments on commit c081217

Please sign in to comment.