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

feat: new common ui #276

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
6 changes: 6 additions & 0 deletions site/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {

Check warning on line 1 in site/postcss.config.js

View workflow job for this annotation

GitHub Actions / build

Assign object to a variable before exporting as module default
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
4 changes: 2 additions & 2 deletions site/src/components/Background.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const Background = styled.div`
width: 100%;
left: 0;
top: 0;
border-bottom: solid 1px #f0f3f8;
background: #ffffff;
border-bottom: solid 1px var(--strokeBorderDefault);
background: var(--fillBgPrimary);
`;

export default Background;
2 changes: 1 addition & 1 deletion site/src/components/Bounty/BountyLogo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Wrapper = styled.div`
height: 64px;
border: 1px solid #d2d9e2;
border-radius: 50%;
background: #f0f3f8;
background: var(--fillBgTertiary);
overflow: hidden;

img.logo {
Expand Down
10 changes: 5 additions & 5 deletions site/src/components/Bounty/Detail/Meta/JoinGroupButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ const JoinGroup = styled.div`
width: 99px;
height: 32px;

background: #F0F3F8;
background: var(--fillBgTertiary);
border-radius: 18px;

font-style: normal;
font-weight: 500;
font-size: 12px;
line-height: 16px;

color: #A1A8B3;
color: #a1a8b3;
cursor: pointer;

:hover {
svg path {
fill: #6848FF;
fill: #6848ff;
}
color: #6848FF;
background: #F2F0FF;
color: #6848ff;
background: #f2f0ff;
}
`;

Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Bounty/Detail/Meta/Share.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const ShareButton = styled(FlexCenter)`
width: 32px;
height: 32px;
border-radius: 50%;
background-color: #f0f3f8;
background-color: var(--fillBgTertiary);
:hover {
cursor: pointer;
${(p) =>
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Bounty/Import/BountyLogo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const LogoContainer = styled.div`
height: 80px;
border: 1px solid #d2d9e2;
border-radius: 50%;
background: #f0f3f8;
background: var(--fillBgTertiary);
overflow: hidden;

div.upload {
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Bounty/Import/styled.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const Wrapper = styled.div`
export const Box = styled.div`
box-shadow: 0px 4px 31px rgba(26, 33, 44, 0.04),
0px 0.751293px 3.88168px rgba(26, 33, 44, 0.03);
border: 1px solid #f0f3f8;
border: 1px solid var(--strokeBorderDefault);
padding: 32px;
background-color: white;
@media screen and (max-width: 900px) {
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/ChildBounty/Detail/MetaEdit/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { useHandleSigningError } from "@/hooks/useHandleSigningError";
const Box = styled.div`
box-shadow: 0px 4px 31px rgba(26, 33, 44, 0.04),
0px 0.751293px 3.88168px rgba(26, 33, 44, 0.03);
border: 1px solid #f0f3f8;
border: 1px solid var(--strokeBorderDefault);
padding: 32px;
background-color: white;
@media screen and (max-width: 900px) {
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/ChildBounty/Import/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const Wrapper = styled.div`
const Box = styled.div`
box-shadow: 0px 4px 31px rgba(26, 33, 44, 0.04),
0px 0.751293px 3.88168px rgba(26, 33, 44, 0.03);
border: 1px solid #f0f3f8;
border: 1px solid var(--strokeBorderDefault);
padding: 32px;
background-color: white;
@media screen and (max-width: 900px) {
Expand Down
8 changes: 2 additions & 6 deletions site/src/components/Common/Detail/DisabledInputBountyId.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ const InputAndError = styled.div`
gap: 8px;
`;

export default function DisabledInputBountyId({
title,
tooltip,
bountyId,
}) {
export default function DisabledInputBountyId({ title, tooltip, bountyId }) {
return (
<>
<Title>
Expand All @@ -31,7 +27,7 @@ export default function DisabledInputBountyId({
<Input
defaultValue={bountyId}
placeholder="0"
style={{ background: "#f0f3f8" }}
style={{ background: "var(--fillBgTertiary)" }}
/>
</InputAndError>
</>
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Common/Import/BountyMeta.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const SignatoriesDivider = styled.div`
flex-grow: 1;
display: inline-block;
height: 1px;
background: #f0f3f8;
background: var(--fillBgTertiary);
`;

const Field = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Discussion/Item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import ActionBar from "./ActionBar";
const ContentWrapper = styled.div`
margin: 8px 0 0 28px;
padding-bottom: 20px;
border-bottom: solid 1px #f0f3f8;
border-bottom: solid 1px var(--strokeBorderDefault);
> :first-child {
${p_14_normal};
}
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/MobileMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const FloatingWrapper = styled.ul`
}

> :not(:last-child) {
border-bottom: 1px solid #f0f3f8;
border-bottom: 1px solid var(--strokeBorderDefault);
}
`;

Expand Down
2 changes: 1 addition & 1 deletion site/src/components/NodeSelect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const Select = styled(Flex)`
`;

const Options = styled.div`
background: #ffffff;
background: var(--fillBgPrimary);
box-shadow: 0px 6px 22px rgba(30, 33, 52, 0.11),
0px 1.34018px 4.91399px rgba(30, 33, 52, 0.0655718),
0px 0.399006px 1.46302px rgba(30, 33, 52, 0.0444282);
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Notification/NotificationTabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MOBILE_SIZE } from "@osn/constants";
import { netural_grey_200 } from "@osn/common-ui/es/styles/colors";

const TabsWrapper = styled.div`
background-color: #fff;
background-color: var(--fillBgPrimary);
padding-top: 40px;
border-bottom: 1px solid ${netural_grey_200};
@media screen and (max-width: ${MOBILE_SIZE}px) {
Expand Down
6 changes: 3 additions & 3 deletions site/src/components/User/ConnectedAccount.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ const MenuWrapper = styled.div`
position: absolute;
right: 0;
top: 100%;
background: #ffffff;
border: 1px solid #f0f3f8;
background: var(--fillBgPrimary);
border: 1px solid var(--strokeBorderDefault);
padding: 16px 16px 8px;
z-index: 1;

Expand Down Expand Up @@ -112,7 +112,7 @@ const MenuItem = styled.div`

const MenuDivider = styled.div`
height: 1px;
background: #f0f3f8;
background: var(--fillBgTertiary);
margin: 12px 0;
`;

Expand Down
6 changes: 2 additions & 4 deletions site/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ body {
margin: 0;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #1e2134;
background: #fbfcfe;
}

body * {
Expand Down Expand Up @@ -52,8 +50,8 @@ body a:hover {
font-style: normal;
font-weight: 400;
src: url("/fonts/inter-v3-latin-regular.woff2") format("woff2"),
/* Super Modern Browsers */
url("/fonts/inter-v3-latin-regular.woff") format("woff");
/* Super Modern Browsers */ url("/fonts/inter-v3-latin-regular.woff")
format("woff");
}

@font-face {
Expand Down
1 change: 1 addition & 0 deletions site/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import store from "./store";
import "./index.css";
import "semantic-ui-css/semantic.min.css";
import "react-mde/lib/styles/css/react-mde-all.css";
import "@osn/common-ui/styles/index.css";

const root = createRoot(document.getElementById("root"));
root.render(
Expand Down
12 changes: 4 additions & 8 deletions site/src/pages/404.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import styled from "styled-components";
import {
h3_36_bold,
h4_24_bold,
p_16_normal,
} from "@osn/common-ui";
import { h3_36_bold, h4_24_bold, p_16_normal } from "@osn/common-ui";
import { Link } from "react-router-dom";

const Wrapper = styled.div`
Expand All @@ -14,12 +10,12 @@ const Wrapper = styled.div`
`;

const Section = styled.div`
background: #fff;
border-top: 1px solid #f0f3f8;
background-color: var(--fillBgPrimary);
border-top: 1px solid var(--strokeBorderDefault);
@media screen and (max-width: 800px) {
border-top: none;
}
border-bottom: 1px solid #f0f3f8;
border-bottom: 1px solid var(--strokeBorderDefault);
`;

const H1 = styled.h1`
Expand Down
4 changes: 2 additions & 2 deletions site/src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const BountiesWrapper = styled.div`
${(p) =>
p.bg &&
css`
border-bottom: solid 1px #f0f3f8;
background-color: #ffffff;
border-bottom: solid 1px var(--strokeBorderDefault);
background-color: var(--fillBgPrimary);
padding-bottom: 40px;
`}
`;
Expand Down
5 changes: 5 additions & 0 deletions site/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('tailwindcss').Config} */
export default {

Check warning on line 2 in site/tailwind.config.js

View workflow job for this annotation

GitHub Actions / build

Assign object to a variable before exporting as module default
presets: [require("@osn/common-ui/tailwind/preset.js")],
content: ["./src/**/*.{js,jsx}"],
};
Loading