Skip to content

Commit

Permalink
style token adjustments
Browse files Browse the repository at this point in the history
switching out tokens
cleaning up tokens
removing inline formulas using tokens
fixing change type list key bug
  • Loading branch information
ryansrofe committed Apr 28, 2024
1 parent 55bac0a commit 4dad42c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
4 changes: 2 additions & 2 deletions widget-src/components/ChangeLogEmpty.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export const ChangeLogEmpty = ({ isLocked }: { isLocked: boolean }) => (
x={570}
y={-4}
positioning="absolute"
height={SPACE.md}
width={SPACE.lg}
height={SPACE.lg}
width={SPACE.xl}
src={<HelpArrow />}
/>
</>
Expand Down
4 changes: 2 additions & 2 deletions widget-src/components/ChangeLogRow.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChangeLog, ChangeLogState } from '../types/ChangeLog';
import { User } from './log/User';
import { COLOR, GAP, RADIUS, SPACE } from '../utilities/Styles';
import { COLOR, GAP, SPACE } from '../utilities/Styles';
import { ChangeLogEditing } from './log/LogEditing';
import { ChangeLogDisplay } from './log/LogDisplay';

Expand Down Expand Up @@ -78,7 +78,7 @@ export const ChangeLogRow = ({
hidden={isLastRow}
stroke={COLOR.grey}
length="fill-parent"
strokeDashPattern={[RADIUS.sm, RADIUS.sm]}
strokeDashPattern={[SPACE.xxxs, SPACE.xxxs]}
strokeCap="round"
strokeWidth={SPACE.one}
/>
Expand Down
4 changes: 2 additions & 2 deletions widget-src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Footer = () => (
name="Footer"
overflow="visible"
direction="vertical"
spacing={PADDING.xl}
spacing={GAP.lg}
width="fill-parent"
padding={{ top: PADDING.xl }}
>
Expand All @@ -32,7 +32,7 @@ export const Footer = () => (
openExternal('https://commerce.nearform.com/open-source/');
}}
>
<SVG name="FigLog Logo" height={PADDING.xxl} width={PADDING.xxl} src={LogoFigLog} />
<SVG name="FigLog Logo" height={32} width={32} src={LogoFigLog} />
<AutoLayout name="FigLog Logo Text" spacing={GAP.xs}>
<Text
fontFamily={FONT.family}
Expand Down
8 changes: 4 additions & 4 deletions widget-src/components/log/Type.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ export const Type = ({ type, isActive = false }: TypeProps) => {
}}
horizontalAlignItems="center"
verticalAlignItems="center"
spacing={SPACE.xxxs}
spacing={GAP.xs}
positioning="auto"
stroke={showStroke ? COLOR.grey : ''}
strokeDashPattern={showStroke ? [GAP.xs, GAP.xs] : []}
strokeDashPattern={showStroke ? [SPACE.xxxs, SPACE.xxxs] : []}
>
{isActive && <SVG name="Active" height={PADDING.md} width={PADDING.md} src={<Check color={txColor} />} />}
{isActive && <SVG name="Active" height={SPACE.xxs} width={SPACE.xxs} src={<Check color={txColor} />} />}
{type === ('none' || 'added') && (
<SVG name="Add" height={PADDING.md} width={PADDING.md} src={<ActionAddIcon color={txColor} />} />
<SVG name="Add" height={SPACE.xxs} width={SPACE.xxs} src={<ActionAddIcon color={txColor} />} />
)}
<Text
name="Type"
Expand Down
11 changes: 5 additions & 6 deletions widget-src/components/log/TypeMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeType, ChangeTypes } from '../../types/ChangeTypes';
import { COLOR, FONT, PADDING, RADIUS } from '../../utilities/Styles';
import { COLOR, GAP, PADDING, RADIUS } from '../../utilities/Styles';
import { Type } from './Type';

const { widget } = figma;
Expand All @@ -15,15 +15,15 @@ export const TypeMenu = ({ currentType, selectType }: TypeMenuProps) => {
<AutoLayout
positioning="absolute"
x={-PADDING.sm}
y={{ type: 'bottom', offset: FONT.lineHeight.xs + PADDING.xs * 2 + PADDING.xxs }}
y={{ type: 'bottom', offset: PADDING.xxl }}
fill={COLOR.white}
stroke={COLOR.grey}
strokeDashPattern={[]}
padding={{
vertical: PADDING.sm,
horizontal: PADDING.sm,
}}
spacing={PADDING.md}
spacing={GAP.sm}
horizontalAlignItems="start"
verticalAlignItems="center"
overflow="visible"
Expand All @@ -34,14 +34,13 @@ export const TypeMenu = ({ currentType, selectType }: TypeMenuProps) => {
color: COLOR.grey,
offset: { x: 3, y: 3 },
blur: 8,
spread: -4,
}}
>
{ChangeTypes.map(changeType => {
if (changeType !== 'added' && changeType !== 'none') {
return (
<AutoLayout name="Action Wrapper" onClick={() => selectType(changeType)}>
<Type type={changeType} key={changeType} isActive={changeType === currentType} />
<AutoLayout name="Action Wrapper" onClick={() => selectType(changeType)} key={changeType}>
<Type type={changeType} isActive={changeType === currentType} />
</AutoLayout>
);
}
Expand Down

0 comments on commit 4dad42c

Please sign in to comment.