diff --git a/examples/expo-example/src/app.tsx b/examples/expo-example/src/app.tsx
index 297fb7d..2317e7d 100644
--- a/examples/expo-example/src/app.tsx
+++ b/examples/expo-example/src/app.tsx
@@ -79,6 +79,7 @@ function App() {
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
+ elevation: 6,
})}
>
Open up App.tsx to start working on your app!
diff --git a/packages/yoshiki/package.json b/packages/yoshiki/package.json
index d218562..d3554a0 100644
--- a/packages/yoshiki/package.json
+++ b/packages/yoshiki/package.json
@@ -1,6 +1,6 @@
{
"name": "yoshiki",
- "version": "0.3.3",
+ "version": "0.3.4",
"author": "Zoe Roux (https://github.com/AnonymusRaccoon)",
"license": "MIT",
"keywords": [
diff --git a/packages/yoshiki/src/web/generator.ts b/packages/yoshiki/src/web/generator.ts
index 4e97e2a..4c86f89 100644
--- a/packages/yoshiki/src/web/generator.ts
+++ b/packages/yoshiki/src/web/generator.ts
@@ -43,7 +43,7 @@ const stateMapper: {
const sanitize = (className: unknown) => {
const name = typeof className === "string" ? className : JSON.stringify(className);
if (name === undefined) return "undefined";
- return name.replaceAll(/[^\w-_]/g, "");
+ return name.replaceAll(/[^\w\d_]/g, "");
};
type PreprocessBlockFunction = (block: { [key: string]: unknown }) => { [key: string]: unknown };
@@ -67,6 +67,7 @@ const generateClass = (
: [`${cssKey}: ${nValue};`];
})
.join(" ");
+ if (!block.length) return [];
return [[className, addCssContext(className, `{ ${block} }`)]];
};