Skip to content
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
3 changes: 2 additions & 1 deletion packages/web/src/editor/canvas/elements/text-element.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function TextElement({ element, isSelected }: Props) {
fill?: string;
align?: string;
italic?: boolean;
uppercase?: boolean;
};

const fontStyle =
Expand Down Expand Up @@ -154,7 +155,7 @@ export function TextElement({ element, isSelected }: Props) {
y={element.y}
width={element.width}
rotation={element.rotation}
text={p.text || "Text"}
text={p.uppercase ? (p.text || "Text").toUpperCase() : (p.text || "Text")}
fontSize={p.fontSize || 18}
fontFamily={p.fontFamily || "Inter"}
fontStyle={fontStyle}
Expand Down
10 changes: 10 additions & 0 deletions packages/web/src/editor/inspector/sections/text-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export function TextSection({ element }: Props) {
fill?: string;
align?: string;
italic?: boolean;
uppercase?: boolean;
};

const update = (patch: Record<string, unknown>) =>
Expand Down Expand Up @@ -95,6 +96,15 @@ export function TextSection({ element }: Props) {
<Italic size={14} />
</SegBtn>
</SegGroup>
<SegGroup>
<SegBtn
active={!!p.uppercase}
onClick={() => update({ uppercase: !p.uppercase })}
title="All Caps (TT)"
>
<span className="font-bold text-[11px] font-mono leading-none px-1">TT</span>
</SegBtn>
</SegGroup>
<SegGroup>
<SegBtn
active={p.align === "left"}
Expand Down