mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 05:26:24 +09:00
fix: Make colon in advanced section look more aligned (#3196)
## Description <img width="233" alt="image" src="https://github.com/webstudio-is/webstudio/assets/52824/e4368482-cce2-4784-b0bf-d65a30cde9ff"> ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `builder/env-check.js` if mandatory
This commit is contained in:
1 parent
82b544be48
commit
15daa47b1f
7 files changed
+15
-20
No files matched your search
@@ -146,7 +146,7 @@ const MetadataItem = (props: {
|
||||
export const CustomMetadata = (props: CustomMetadataProps) => {
|
||||
return (
|
||||
<Grid gap={2} css={{ my: theme.spacing[5], mx: theme.spacing[8] }}>
|
||||
<Label sectionTitle>Custom Metadata</Label>
|
||||
<Label text="title">Custom Metadata</Label>
|
||||
<Text color="subtle">
|
||||
Use this section to input metadata for the document, which will be used
|
||||
to generate{" "}
|
||||
|
||||
@@ -767,7 +767,7 @@ const FormFields = ({
|
||||
*/}
|
||||
<Grid gap={2} css={{ my: theme.spacing[5], mx: theme.spacing[8] }}>
|
||||
<Grid gap={2}>
|
||||
<Label sectionTitle>Search</Label>
|
||||
<Label text="title">Search</Label>
|
||||
<Text color="subtle">
|
||||
Optimize the way this page appears in search engine results pages.
|
||||
</Text>
|
||||
@@ -961,7 +961,7 @@ const FormFields = ({
|
||||
* ----------------------========<<<Social Sharing>>>>========----------------------
|
||||
*/}
|
||||
<Grid gap={2} css={{ my: theme.spacing[5], mx: theme.spacing[8] }}>
|
||||
<Label htmlFor={fieldIds.socialImageAssetId} sectionTitle>
|
||||
<Label htmlFor={fieldIds.socialImageAssetId} text="title">
|
||||
Social Image
|
||||
</Label>
|
||||
<Text color="subtle">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useMemo, useRef, useState } from "react";
|
||||
import { Box, Flex, theme } from "@webstudio-is/design-system";
|
||||
import { Box, Flex, Text } from "@webstudio-is/design-system";
|
||||
import { properties as propertiesData } from "@webstudio-is/css-data";
|
||||
import { useStore } from "@nanostores/react";
|
||||
import type { StyleProperty } from "@webstudio-is/css-engine";
|
||||
@@ -126,7 +126,7 @@ export const Section = ({ currentStyle, ...props }: SectionProps) => {
|
||||
style={currentStyle}
|
||||
onReset={() => deleteProperty(property)}
|
||||
/>
|
||||
<Box css={{ p: theme.spacing[2], pt: 0 }}>:</Box>
|
||||
<Text>:</Text>
|
||||
<CssValueInputContainer
|
||||
variant="chromeless"
|
||||
size="1"
|
||||
|
||||
@@ -89,7 +89,7 @@ export const AddDomain = ({
|
||||
>
|
||||
{isOpen && (
|
||||
<>
|
||||
<Label htmlFor={id} sectionTitle>
|
||||
<Label htmlFor={id} text="title">
|
||||
New Domain
|
||||
</Label>
|
||||
<InputField
|
||||
|
||||
@@ -63,7 +63,7 @@ const LabelStory: ComponentStory<typeof Label> = ({
|
||||
<StorySection title="Section title">
|
||||
<StoryGrid horizontal>
|
||||
{colors.map((color) => (
|
||||
<Label key={color} color={color} sectionTitle>
|
||||
<Label key={color} color={color} text="title">
|
||||
{color}
|
||||
</Label>
|
||||
))}
|
||||
|
||||
@@ -29,6 +29,7 @@ const StyledLabel = styled(RadixLabel, {
|
||||
boxSizing: "border-box",
|
||||
flexShrink: 0,
|
||||
py: theme.spacing[1],
|
||||
px: theme.spacing[2],
|
||||
border: "1px solid transparent",
|
||||
borderRadius: theme.borderRadius[3],
|
||||
transition: "200ms color, 200ms background-color",
|
||||
@@ -57,13 +58,10 @@ const StyledLabel = styled(RadixLabel, {
|
||||
default: {
|
||||
color: theme.colors.foregroundMain,
|
||||
"&:hover": {
|
||||
px: theme.spacing[3],
|
||||
mx: `calc(${theme.spacing[3]} * -1)`,
|
||||
backgroundColor: theme.colors.backgroundHover,
|
||||
},
|
||||
},
|
||||
preset: {
|
||||
px: theme.spacing[3],
|
||||
backgroundColor: theme.colors.backgroundPresetMain,
|
||||
color: theme.colors.foregroundMain,
|
||||
"&:hover": {
|
||||
@@ -71,7 +69,6 @@ const StyledLabel = styled(RadixLabel, {
|
||||
},
|
||||
},
|
||||
local: {
|
||||
px: theme.spacing[3],
|
||||
backgroundColor: theme.colors.backgroundLocalMain,
|
||||
color: theme.colors.foregroundLocalMain,
|
||||
"&:hover": {
|
||||
@@ -79,7 +76,6 @@ const StyledLabel = styled(RadixLabel, {
|
||||
},
|
||||
},
|
||||
overwritten: {
|
||||
px: theme.spacing[3],
|
||||
backgroundColor: theme.colors.backgroundOverwrittenMain,
|
||||
color: theme.colors.foregroundOverwrittenMain,
|
||||
"&:hover": {
|
||||
@@ -87,7 +83,6 @@ const StyledLabel = styled(RadixLabel, {
|
||||
},
|
||||
},
|
||||
remote: {
|
||||
px: theme.spacing[3],
|
||||
backgroundColor: theme.colors.backgroundRemoteMain,
|
||||
color: theme.colors.foregroundRemoteMain,
|
||||
"&:hover": {
|
||||
@@ -104,20 +99,20 @@ const StyledLabel = styled(RadixLabel, {
|
||||
flexGrow: 1,
|
||||
},
|
||||
},
|
||||
sectionTitle: {
|
||||
true: textVariants.titles,
|
||||
false: textVariants.labelsSentenceCase,
|
||||
text: {
|
||||
title: textVariants.titles,
|
||||
sentence: textVariants.labelsSentenceCase,
|
||||
},
|
||||
},
|
||||
|
||||
defaultVariants: {
|
||||
sectionTitle: false,
|
||||
text: "sentence",
|
||||
},
|
||||
});
|
||||
|
||||
type Props = {
|
||||
color?: (typeof labelColors)[number];
|
||||
sectionTitle?: boolean;
|
||||
text?: "title" | "sentence";
|
||||
disabled?: boolean;
|
||||
truncate?: boolean;
|
||||
children: ReactNode;
|
||||
|
||||
@@ -184,7 +184,7 @@ export const SectionTitleLabel = forwardRef(
|
||||
css,
|
||||
children,
|
||||
...props
|
||||
}: Omit<ComponentProps<typeof Label>, "truncate" | "sectionTitle">,
|
||||
}: Omit<ComponentProps<typeof Label>, "truncate" | "text">,
|
||||
ref: Ref<HTMLLabelElement>
|
||||
) => {
|
||||
const { state } = useContext(context);
|
||||
@@ -198,7 +198,7 @@ export const SectionTitleLabel = forwardRef(
|
||||
return (
|
||||
<Label
|
||||
truncate
|
||||
sectionTitle
|
||||
text="title"
|
||||
{...props}
|
||||
color={color}
|
||||
css={{
|
||||
|
||||
Reference in new issue
Block a user