Skip to content

Commit

Permalink
fix(plasma-theme-builder): Fix styling problems
Browse files Browse the repository at this point in the history
  • Loading branch information
neretin-trike committed Mar 21, 2024
1 parent a626878 commit 382f8a7
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const Root = styled.div``;
const GradientTokenWrapper = styled.div`
display: flex;
gap: 1rem;
height: 5rem;
margin-top: 1rem;
`;
Expand All @@ -33,10 +32,6 @@ const GradientTokenLayers = styled.div`

const StyledTextArea = styled(TextArea)`
flex: 1;
textarea {
height: 5rem;
}
`;

interface GradientTokenValueProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {

const StyledPullRequest = styled.div`
margin: 2rem 0;
width: 70rem;
width: 86rem;
`;

const ProgressGroup = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { emptyInputData } from '../../types';
import type { InputData, Theme as ThemeType } from '../../types';

const StyledTheme = styled.div`
width: 70rem;
width: 86rem;
`;

const Description = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const StyledThemeModeToggle = styled.div`
`;

const StyledThemeTypeButton = styled(Button)<{ isSelected: boolean }>`
padding: 0.75rem 0;
cursor: pointer;
color: ${({ isSelected }) => (isSelected ? accent : tertiary)};
`;
Expand Down
12 changes: 3 additions & 9 deletions website/plasma-theme-builder/src/components/Token/Token.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { PreviewColor } from '../PreviewColor/PreviewColor';

const IconButtons = styled.div`
display: flex;
min-width: 9rem;
min-width: 12rem;
justify-content: end;
`;

Expand All @@ -28,7 +28,7 @@ const StyledToken = styled(TextM)<{ enabled?: boolean }>`
align-items: center;
justify-content: space-between;
width: 67rem;
width: 83rem;
margin: 1rem 0;
margin-left: 2rem;
Expand Down Expand Up @@ -130,13 +130,7 @@ export const Token = ({ section, subsection, name, data }: TokenProps) => {

return (
<StyledToken enabled={enabled}>
<Tooltip
placement="top-start"
isVisible={Boolean(comment) && visible}
arrow={false}
text={comment}
animated
>
<Tooltip placement="top-start" isOpen={Boolean(comment) && visible} hasArrow text={comment}>
<TokenName
disable={enabled === false}
onClick={onTokenEditClick}
Expand Down
46 changes: 28 additions & 18 deletions website/plasma-theme-builder/src/components/TokenForm/TokenForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,16 @@ const StyledHeader = styled(H3)`
${SBSansTextMono}
`;

const StyledTokenName = styled(TextField)`
input {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
const StyledTokenName = styled(TextField)``;

width: 100%;
/* TODO: Убрать это когда появится возможность стилизовать компонент */
const StyledCommentWrapper = styled.div`
label {
width: 35rem;
}
`;

const StyledTextField = styled(TextField)`
width: 35rem;
`;
const StyledTextField = styled(TextField)``;

const StyledButtons = styled.div`
display: flex;
Expand All @@ -59,6 +57,16 @@ const StyledTokenPrefix = styled.span`
const TokenName = styled.div`
width: 35rem;
display: flex;
/* TODO: Убрать это когда появится возможность стилизовать компонент */
label {
width: 100% !important;
}
div {
border-top-left-radius: 0 !important;
border-bottom-left-radius: 0 !important;
}
`;

const TokenValue = styled.div`
Expand Down Expand Up @@ -249,15 +257,17 @@ export const TokenForm = ({
</TokenValue>
</FormField>
<FormField label="Комментарий">
<StyledTextField
size="s"
name="comment"
readOnly={canRename}
value={comment?.value}
status={comment?.status}
helperText={comment?.helpText}
onChange={onChangeComment}
/>
<StyledCommentWrapper>
<StyledTextField
size="s"
name="comment"
readOnly={canRename}
value={comment?.value}
status={comment?.status}
helperText={comment?.helpText}
onChange={onChangeComment}
/>
</StyledCommentWrapper>
</FormField>
<FormField label="Отображать токен">
<Switch
Expand Down

0 comments on commit 382f8a7

Please sign in to comment.