Skip to content
Merged
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
12 changes: 6 additions & 6 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const code = `ReactPPTX.render(
}}
/>
</Slide>

<Slide style={{ backgroundColor: "#DDDDDD" }}>
<Text style={{ x: 3, y: 1, w: 3, h: 0.5, fontSize: 32 }}>
<Text.Bullet>Adding bullet 1</Text.Bullet>
Expand All @@ -163,18 +163,18 @@ const code = `ReactPPTX.render(
</Slide>
<Slide>
<Image
src={{ kind: "path", path: "https://source.unsplash.com/random/800x600" }}
src={{ kind: "path", path: "https://picsum.photos/800/600" }}
style={{ x: "10%", y: "10%", w: "80%", h: "80%" }}
/>
</Slide>
<Slide>
<Table
rows={[
[<Table.Cell
colSpan={2}
style={{
align: "center",
backgroundColor: '#115599',
colSpan={2}
style={{
align: "center",
backgroundColor: '#115599',
color: 'white'
}}>
Title
Expand Down
2 changes: 1 addition & 1 deletion src/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ describe("test render", () => {
}}
>
<Image
src={{ kind: "path", path: "http://www.fillmurray.com/460/300" }}
src={{ kind: "path", path: "https://picsum.photos/460/300" }}
style={{ x: "10%", y: "10%", w: "80%", h: "80%" }}
/>
</Slide>
Expand Down
4 changes: 1 addition & 3 deletions src/preview/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ const normalizedColorToCSS = (color: HexColor | ComplexColor) => {

const normalizeBorderToCSS = (style: InternalTableStyle) =>
`${style.borderWidth ?? 0}px solid ${
style.borderColor
? normalizedColorToCSS(style.borderColor)
: undefined ?? "transparent"
style.borderColor ? normalizedColorToCSS(style.borderColor) : undefined
}`;

const SlideObjectShape = ({ shape }: { shape: InternalShape }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
const normalizedColorToPptxgenShapeFill = (
color: HexColor | ComplexColor | null | undefined
): pptxgen.ShapeFillProps | undefined => {
return typeof color === "string" ? { color: color } : color ?? undefined;
return typeof color === "string" ? { color: color } : (color ?? undefined);
};

const renderTextParts = (parts: InternalTextPart[]): PptxGenJs.TextProps[] => {
Expand Down
Loading