Skip to content

Commit

Permalink
Merge pull request #133 from aiven/smulis-setup-css-modules
Browse files Browse the repository at this point in the history
feat[coral]: Showcase css modules with example
  • Loading branch information
programmiri authored Oct 24, 2022
2 parents f814b9e + b3a39a1 commit 35f3aa1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
4 changes: 2 additions & 2 deletions coral/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export default {
testEnvironment: "jsdom",
setupFilesAfterEnv: ['<rootDir>/test-setup/setup-files-after-env.ts'],
moduleNameMapper: {
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2|svg)$":
"jest-transform-stub",
".+\\.(png|jpg|ttf|woff|woff2|svg)$": "jest-transform-stub",
"\\.css$": "identity-obj-proxy",
"^@/(.*)$": "<rootDir>/src/$1",
},
};
1 change: 1 addition & 0 deletions coral/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-react": "^7.31.10",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.2.1",
"jest-environment-jsdom": "^29.2.1",
"lodash": "4.x",
Expand Down
13 changes: 13 additions & 0 deletions coral/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions coral/src/App.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.aClassName {
color: pink;
}
3 changes: 2 additions & 1 deletion coral/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Flexbox, TagLabel, Typography } from "@aivenio/design-system";
import classes from "./App.module.css";

function App() {
return (
<div>
<Typography htmlTag={"h1"} variant={"heading-2xl"}>
Hello Klaw 👋
</Typography>
<Flexbox alignItems={"center"}>
<Flexbox alignItems={"center"} className={classes.aClassName}>
<p>This uses the aiven design system! &nbsp; </p>
<TagLabel title="yey" />
</Flexbox>
Expand Down

0 comments on commit 35f3aa1

Please sign in to comment.