Skip to content

Commit

Permalink
chore: rename react to styled (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkamenoko authored May 8, 2024
1 parent b3c64ae commit eb19cef
Show file tree
Hide file tree
Showing 51 changed files with 1,219 additions and 732 deletions.
4 changes: 2 additions & 2 deletions examples/ladle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"devDependencies": {
"@casablanca/core": "0.0.1",
"@casablanca/react": "0.0.1",
"@casablanca/styled": "0.0.1",
"@ladle/react": "^4.0.2",
"@styled/typescript-styled-plugin": "^1.0.1",
"@types/react": "^18.2.55",
Expand All @@ -31,7 +31,7 @@
},
"dependencies": [
"../../packages/core:build",
"../../packages/react:build"
"../../packages/styled:build"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/ladle/src/components/button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css } from "@casablanca/core";
import { styled } from "@casablanca/react";
import { styled } from "@casablanca/styled";
import type { FC } from "react";
import { useState } from "react";

Expand Down
4 changes: 2 additions & 2 deletions examples/ladle/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { casablanca } from "@casablanca/core/vite";
import { casablancaReact } from "@casablanca/react/vite";
import { casablancaStyled } from "@casablanca/styled/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
plugins: [tsconfigPaths(), react(), casablancaReact(), casablanca()],
plugins: [tsconfigPaths(), react(), casablancaStyled(), casablanca()],
});
6 changes: 3 additions & 3 deletions examples/rakkas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"devDependencies": {
"@casablanca/core": "0.0.1",
"@casablanca/react": "0.0.1",
"@casablanca/styled": "0.0.1",
"@styled/typescript-styled-plugin": "^1.0.1",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.18",
Expand All @@ -34,7 +34,7 @@
},
"dependencies": [
"../../packages/core:build",
"../../packages/react:build"
"../../packages/styled:build"
]
},
"build": {
Expand All @@ -44,7 +44,7 @@
},
"dependencies": [
"../../packages/core:build",
"../../packages/react:build"
"../../packages/styled:build"
],
"files": [
"./src/",
Expand Down
2 changes: 1 addition & 1 deletion examples/rakkas/src/components/link.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from "@casablanca/react";
import { styled } from "@casablanca/styled";
import { StyledLink } from "rakkasjs";

export const LinkWithBorder = styled(StyledLink)`
Expand Down
2 changes: 1 addition & 1 deletion examples/rakkas/src/routes/counter/index.page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from "@casablanca/react";
import { styled } from "@casablanca/styled";
import { type Page, StyledLink } from "rakkasjs";
import { useState } from "react";

Expand Down
2 changes: 1 addition & 1 deletion examples/rakkas/src/routes/index.page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from "@casablanca/react";
import { styled } from "@casablanca/styled";
import { modularScale } from "polished";
import type { Page } from "rakkasjs";
import { LinkWithBorder } from "#@/components/link";
Expand Down
4 changes: 2 additions & 2 deletions examples/rakkas/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { casablanca } from "@casablanca/core/vite";
import { casablancaReact } from "@casablanca/react/vite";
import { casablancaStyled } from "@casablanca/styled/vite";
import react from "@vitejs/plugin-react";
import rakkas from "rakkasjs/vite-plugin";
import { defineConfig } from "vite";
Expand All @@ -9,7 +9,7 @@ export default defineConfig({
plugins: [
tsconfigPaths(),
react(),
casablancaReact(),
casablancaStyled(),
casablanca(),
rakkas(),
],
Expand Down
6 changes: 3 additions & 3 deletions examples/vite-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"devDependencies": {
"@casablanca/core": "0.0.1",
"@casablanca/react": "0.0.1",
"@casablanca/styled": "0.0.1",
"@styled/typescript-styled-plugin": "^1.0.1",
"@vitejs/plugin-react": "^4.2.1",
"postcss-nested": "^6.0.1",
Expand All @@ -36,7 +36,7 @@
],
"dependencies": [
"../../packages/core:build",
"../../packages/react:build"
"../../packages/styled:build"
],
"output": [
"./dist/**"
Expand All @@ -50,7 +50,7 @@
},
"dependencies": [
"../../packages/core:build",
"../../packages/react:build"
"../../packages/styled:build"
]
},
"preview": {
Expand Down
8 changes: 7 additions & 1 deletion examples/vite-react-ts/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { styled } from "@casablanca/react";
import { css } from "@casablanca/core";
import { styled } from "@casablanca/styled";
import { modularScale } from "polished";
import { type FC, useState } from "react";
import { Button } from "./Button";
Expand All @@ -18,6 +19,10 @@ const StyledH1 = styled("h1")`
font-size: ${modularScale(2)};
`;

const fontSize = css`
font-size: 3rem;
`;

const ContainerDiv = styled("div")`
display: grid;
grid-template-columns: auto;
Expand Down Expand Up @@ -48,6 +53,7 @@ export const App: FC = () => {
>
ChangeColor
</button>
<p className={fontSize}>Foobar</p>
</ContainerDiv>
);
};
5 changes: 3 additions & 2 deletions examples/vite-react-ts/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { casablanca } from "@casablanca/core/vite";
import { casablancaReact } from "@casablanca/react/vite";
import { casablancaStyled } from "@casablanca/styled/vite";
import react from "@vitejs/plugin-react";
import postcssNested from "postcss-nested";
import { defineConfig } from "vite";

export default defineConfig({
css: {
postcss: { plugins: [postcssNested()] },
devSourcemap: true,
},
plugins: [react(), casablancaReact(), casablanca()],
plugins: [react(), casablancaStyled(), casablanca()],
});
2 changes: 1 addition & 1 deletion examples/vite-vanilla-ts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const h1Style = css`
border: 1px solid red;
`;

const divStyle = css`
const divStyle: string = css`
composes: ${grid};
grid-template-columns: auto;
justify-content: center;
Expand Down
1 change: 1 addition & 0 deletions examples/vite-vanilla-ts/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import { defineConfig } from "vite";

export default defineConfig({
plugins: [casablanca()],
css: { devSourcemap: true },
});
Loading

0 comments on commit eb19cef

Please sign in to comment.