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

Vivid Code Gen #2512

Open
wants to merge 1 commit into
base: main
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
9 changes: 9 additions & 0 deletions components/Check.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import check from "./check.svg";
import styled from "styled-components";
const CheckComponent = styled.img`
width: 24px;
height: 24px;
`;
export const Check = ({ override }: { override?: React.CSSProperties }) => {
return <CheckComponent src={check.src} style={override} />;
};
290 changes: 290 additions & 0 deletions components/CompactIconButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,290 @@
import { QrcodeScan } from "./QrcodeScan";
import styled from "styled-components";
const CompactIconButtonComponent = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
padding: 4px 7px;
border-radius: 4px;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.02);
height: 25px;
border-style: solid;
border-color: rgba(0, 0, 0, 0.08);
border-width: 1px;
background-color: rgba(0, 0, 0, 0.04);
`;
const CompactIconButtonComponent1 = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
padding: 4px 9px;
border-radius: 4px;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.02);
height: 30px;
border-style: solid;
border-color: rgba(0, 0, 0, 0.08);
border-width: 1px;
background-color: rgba(0, 0, 0, 0.04);
`;
const CompactIconButtonComponent2 = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
padding: 4px 8px;
border-radius: 4px;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.02);
height: 27px;
border-style: solid;
border-color: rgba(0, 0, 0, 0.08);
border-width: 1px;
background-color: rgba(0, 0, 0, 0.04);
`;
const CompactIconButtonComponent3 = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
padding: 4px 7px;
border-radius: 4px;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.02);
height: 25px;
border-style: solid;
border-color: rgba(0, 0, 0, 0.08);
border-width: 1px;
background-color: rgb(255, 255, 255);
`;
const CompactIconButtonComponent4 = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
padding: 4px 7px;
border-radius: 4px;
height: 25px;
background-color: rgba(0, 0, 0, 0.04);
`;
const CompactIconButtonComponent5 = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
padding: 4px 8px;
border-radius: 4px;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.02);
height: 27px;
border-style: solid;
border-color: rgba(0, 0, 0, 0.08);
border-width: 1px;
background-color: rgb(255, 255, 255);
`;
const CompactIconButtonComponent6 = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
padding: 4px 8px;
border-radius: 4px;
height: 27px;
background-color: rgba(0, 0, 0, 0.04);
`;
const CompactIconButtonComponent7 = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
padding: 4px 8px;
border-radius: 4px;
height: 27px;
`;
const CompactIconButtonComponent8 = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
padding: 4px 9px;
border-radius: 4px;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.02);
height: 30px;
border-style: solid;
border-color: rgba(0, 0, 0, 0.08);
border-width: 1px;
background-color: rgb(255, 255, 255);
`;
const CompactIconButtonComponent9 = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
padding: 4px 9px;
border-radius: 4px;
height: 30px;
background-color: rgba(0, 0, 0, 0.04);
`;
const CompactIconButtonComponent10 = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
padding: 4px 9px;
border-radius: 4px;
height: 30px;
`;
const CompactIconButtonComponent11 = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
padding: 4px 7px;
border-radius: 4px;
height: 25px;
`;
export const CompactIconButton = ({
override,
hover,
size,
type,
}: {
override?: React.CSSProperties;
hover: string;
size: string;
type: string;
}) => {
if (hover === "no" && size === "small" && type === "ghost") {
return (
<CompactIconButtonComponent11 style={override}>
<QrcodeScan
override={{
height: "14px",
width: "14px",
}}
/>
</CompactIconButtonComponent11>
);
} else if (hover === "no" && size === "large" && type === "ghost") {
return (
<CompactIconButtonComponent10 style={override}>
<QrcodeScan
override={{
height: "20px",
width: "20px",
}}
/>
</CompactIconButtonComponent10>
);
} else if (hover === "yes" && size === "large" && type === "ghost") {
return (
<CompactIconButtonComponent9 style={override}>
<QrcodeScan
override={{
height: "20px",
width: "20px",
}}
/>
</CompactIconButtonComponent9>
);
} else if (hover === "no" && size === "large" && type === "secondary") {
return (
<CompactIconButtonComponent8 style={override}>
<QrcodeScan
override={{
height: "20px",
width: "20px",
}}
/>
</CompactIconButtonComponent8>
);
} else if (hover === "no" && size === "medium" && type === "ghost") {
return (
<CompactIconButtonComponent7 style={override}>
<QrcodeScan
override={{
height: "16px",
width: "16px",
}}
/>
</CompactIconButtonComponent7>
);
} else if (hover === "yes" && size === "medium" && type === "ghost") {
return (
<CompactIconButtonComponent6 style={override}>
<QrcodeScan
override={{
height: "16px",
width: "16px",
}}
/>
</CompactIconButtonComponent6>
);
} else if (hover === "no" && size === "medium" && type === "secondary") {
return (
<CompactIconButtonComponent5 style={override}>
<QrcodeScan
override={{
height: "16px",
width: "16px",
}}
/>
</CompactIconButtonComponent5>
);
} else if (hover === "yes" && size === "small" && type === "ghost") {
return (
<CompactIconButtonComponent4 style={override}>
<QrcodeScan
override={{
height: "14px",
width: "14px",
}}
/>
</CompactIconButtonComponent4>
);
} else if (hover === "no" && size === "small" && type === "secondary") {
return (
<CompactIconButtonComponent3 style={override}>
<QrcodeScan
override={{
height: "14px",
width: "14px",
}}
/>
</CompactIconButtonComponent3>
);
} else if (hover === "yes" && size === "medium" && type === "secondary") {
return (
<CompactIconButtonComponent2 style={override}>
<QrcodeScan
override={{
height: "16px",
width: "16px",
}}
/>
</CompactIconButtonComponent2>
);
} else if (hover === "yes" && size === "large" && type === "secondary") {
return (
<CompactIconButtonComponent1 style={override}>
<QrcodeScan
override={{
height: "20px",
width: "20px",
}}
/>
</CompactIconButtonComponent1>
);
} else if (hover === "yes" && size === "small" && type === "secondary") {
return (
<CompactIconButtonComponent style={override}>
<QrcodeScan
override={{
height: "14px",
width: "14px",
}}
/>
</CompactIconButtonComponent>
);
} else {
return null;
}
};
80 changes: 80 additions & 0 deletions components/FacepileAvatars.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import { InitialsAvatar } from "./InitialsAvatar";
import { PhotoAvatar } from "./PhotoAvatar";
import styled from "styled-components";
const FacepileAvatarsComponent = styled.div`
display: flex;
align-items: flex-start;
width: fit-content;
height: fit-content;
`;
const FacepileAvatarsComponent1 = styled.div`
display: flex;
align-items: flex-start;
width: fit-content;
height: fit-content;
`;
const FacepileAvatarsComponent2 = styled.div`
display: flex;
align-items: flex-start;
width: 13px;
height: 22px;
`;
const FacepileAvatarsComponent3 = styled.div`
display: flex;
align-items: flex-start;
width: 32px;
height: 32px;
`;
export const FacepileAvatars = ({
override,
type,
inactive,
}: {
override?: React.CSSProperties;
type: string;
inactive: string;
}) => {
if (type === "initials" && inactive === "no") {
return (
<FacepileAvatarsComponent3 style={override}>
<InitialsAvatar
size="Large"
color="Orange"
initial="C"
override={{
height: "100%",
flex: "1 1 0%",
}}
/>
</FacepileAvatarsComponent3>
);
} else if (type === "initials" && inactive === "yes") {
return (
<FacepileAvatarsComponent2 style={override}>
<InitialsAvatar
size="Large"
color="Orange"
initial="C"
override={{
height: "22px",
width: "13px",
}}
/>
</FacepileAvatarsComponent2>
);
} else if (type === "photo" && inactive === "yes") {
return (
<FacepileAvatarsComponent1 style={override}>
<PhotoAvatar size="Large" />
</FacepileAvatarsComponent1>
);
} else if (type === "photo" && inactive === "no") {
return (
<FacepileAvatarsComponent style={override}>
<PhotoAvatar size="Large" />
</FacepileAvatarsComponent>
);
} else {
return null;
}
};
9 changes: 9 additions & 0 deletions components/Globe.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import globe from "./globe.svg";
import styled from "styled-components";
const GlobeComponent = styled.img`
width: 24px;
height: 24px;
`;
export const Globe = ({ override }: { override?: React.CSSProperties }) => {
return <GlobeComponent src={globe.src} style={override} />;
};
Loading