Skip to content

Instantly share code, notes, and snippets.

@deniaz
Last active February 10, 2022 18:50
Show Gist options
  • Save deniaz/0a5e4fc216469c6399427b1f6f7fce2a to your computer and use it in GitHub Desktop.
Save deniaz/0a5e4fc216469c6399427b1f6f7fce2a to your computer and use it in GitHub Desktop.
Tailwind Purging Issue
// prettified
import { merge as r } from "../../utilities/merge.js";
import m from "react";
const s = ({ size: e = "small", children: t }) =>
m.createElement(
"div",
{ className: r(["tw-relative", e === "small" ? "tw-pr-1.5" : "tw-pr-2"]) },
t
);
export { s as Test };
//# sourceMappingURL=Test.js.map
import{merge as r}from"../../utilities/merge.js";import m from"react";const s=({size:e="small",children:t})=>m.createElement("div",{className:r(["tw-relative",e==="small"?"tw-pr-1.5":"tw-pr-2"])},t);export{s as Test};
//# sourceMappingURL=Test.js.map
import { merge } from "@utilities/merge";
import React, { FC, PropsWithChildren } from "react";
type Props = {
size?: "small" | "large";
};
export const Test: FC<PropsWithChildren<Props>> = ({ size = "small", children }) => {
return <div className={merge([
"tw-relative",
size === "small" ? "tw-pr-1.5" : "tw-pr-2",
])}>
{children}
</div>;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment