Skip to content

Commit b4b077f

Browse files
authored
fix(snackbar): add styles for SnackbarElement component (#10)
* fix(snackbar): add styles for SnackbarElement component * feat(snackbar): add css file for styling snackbar element * chore(snackbar): remove css import from lit * refactor(snackbar): update package json for export style * chore(snackbar): update package json
1 parent 688a631 commit b4b077f

File tree

2 files changed

+33
-5
lines changed

2 files changed

+33
-5
lines changed

packages/snackbar/package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,15 @@
2929
"types": "./dist/main.d.ts",
3030
"import": "./dist/main.mjs",
3131
"require": "./dist/main.cjs"
32-
}
32+
},
33+
"./style": "./style/main.css"
3334
},
3435
"main": "./dist/main.cjs",
3536
"module": "./dist/main.mjs",
3637
"types": "./dist/main.d.ts",
3738
"files": [
38-
"**/*.{js,mjs,cjs,map,d.ts,html,md,LEGAL.txt}",
39-
"LICENSE",
40-
"!**/*.test.js",
41-
"!demo/**/*"
39+
"**/*.{js,mjs,cjs,map,d.ts,html,md,LEGAL.txt,css}",
40+
"LICENSE"
4241
],
4342
"scripts": {
4443
"build": "wireit",

packages/snackbar/style/main.css

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@layer components {
2+
snack-bar {
3+
@apply bg-inverseSurface text-surface elevation-3 z-snackbar text-labelLarge bottom-safe-32 extended:bottom-safe-12 fixed end-4 start-4 flex min-h-12 flex-shrink translate-y-8 transform-gpu select-none flex-wrap items-end justify-end gap-4 rounded-md px-4 py-2 opacity-0 transition-all duration-200 ease-out md:start-auto md:max-w-sm;
4+
5+
&[open] {
6+
@apply pointer-events-auto opacity-100 ease-in;
7+
}
8+
9+
> span {
10+
@apply grow py-2;
11+
}
12+
13+
> div {
14+
@apply text-bodyMedium flex justify-end gap-2 rounded-full;
15+
16+
& > * {
17+
@apply cursor-pointer rounded-full p-2;
18+
}
19+
}
20+
21+
.action-button {
22+
@apply state-inversePrimary;
23+
}
24+
25+
.close-button {
26+
@apply state-surface;
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)