Skip to content

chore: use px values instead of theme.spacing and theme.shape.borderRadius #10519

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

Merged
merged 6 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
🧹
  • Loading branch information
aslilac committed Nov 3, 2023
commit 2a2393b80d825214efe66eeb85673d65d5740b36
24 changes: 10 additions & 14 deletions site/src/components/Resources/PortForwardButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ export const PortForwardPopoverView: React.FC<
}}
>
<HelpTooltipTitle>Forwarded ports</HelpTooltipTitle>
<HelpTooltipText
sx={{ color: (theme) => theme.palette.text.secondary }}
>
<HelpTooltipText sx={{ color: theme.palette.text.secondary }}>
{ports?.length === 0
? "No open ports were detected."
: "The forwarded ports are exclusively accessible to you."}
Expand All @@ -123,7 +121,7 @@ export const PortForwardPopoverView: React.FC<
<Link
underline="none"
sx={{
color: (theme) => theme.palette.text.primary,
color: theme.palette.text.primary,
fontSize: 14,
display: "flex",
alignItems: "center",
Expand All @@ -142,7 +140,7 @@ export const PortForwardPopoverView: React.FC<
component="span"
sx={{
ml: "auto",
color: (theme) => theme.palette.text.secondary,
color: theme.palette.text.secondary,
fontSize: 13,
fontWeight: 400,
}}
Expand All @@ -157,22 +155,20 @@ export const PortForwardPopoverView: React.FC<

<Box css={{ padding: 20 }}>
<HelpTooltipTitle>Forward port</HelpTooltipTitle>
<HelpTooltipText
sx={{ color: (theme) => theme.palette.text.secondary }}
>
<HelpTooltipText sx={{ color: theme.palette.text.secondary }}>
Access ports running on the agent:
</HelpTooltipText>

<Box
component="form"
sx={{
border: (theme) => `1px solid ${theme.palette.divider}`,
border: `1px solid ${theme.palette.divider}`,
borderRadius: "4px",
mt: 2,
display: "flex",
alignItems: "center",
"&:focus-within": {
borderColor: (theme) => theme.palette.primary.main,
borderColor: theme.palette.primary.main,
},
}}
onSubmit={(e) => {
Expand All @@ -198,26 +194,26 @@ export const PortForwardPopoverView: React.FC<
min={0}
max={65535}
required
sx={{
css={{
fontSize: 14,
height: 34,
p: "0 12px",
background: "none",
border: 0,
outline: "none",
color: (theme) => theme.palette.text.primary,
color: theme.palette.text.primary,
appearance: "textfield",
display: "block",
width: "100%",
}}
/>
<OpenInNewOutlined
sx={{
css={{
flexShrink: 0,
width: 14,
height: 14,
marginRight: 12,
color: (theme) => theme.palette.text.primary,
color: theme.palette.text.primary,
}}
/>
</Box>
Expand Down
19 changes: 0 additions & 19 deletions site/src/components/Resources/Resources.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,6 @@ const reallyLong = {
sensitive: false,
};

export const Markdown: Story = {
args: {
resources: [
{
...nullDevice,
type: "workspace",
id: "1",
name: "Workspace",
metadata: [
{ key: "text", value: "hello", sensitive: false },
{ key: "link", value: "[hello](hello)", sensitive: false },
{ key: "heading", value: "# hello", sensitive: false },
{ key: "image", value: "![go](/icon/go.svg)", sensitive: false },
],
},
],
},
};

export const BunchOfDevicesWithMetadata: Story = {
args: {
resources: [
Expand Down