Skip to content

Commit 66e738e

Browse files
author
Zaydek Michels-Gualtieri
committed
Added a transition to WYSIWYGMenu
1 parent 21909d6 commit 66e738e

2 files changed

Lines changed: 35 additions & 3 deletions

File tree

src/EditorApp/WYSIWYGMenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const WYSIWYGMenu = ({ state, dispatch }) => {
2424
const [tooltip, setTooltip] = React.useState("")
2525

2626
return (
27-
<div className="px-3 py-2 flex flex-row items-center bg-white rounded-lg shadow-hero">
27+
<div className="px-3 py-2 flex flex-row items-center bg-white rounded-lg shadow-hero hover:shadow-hero-lg transition duration-200 ease-in-out">
2828
<div className="-ml-0.5" />
2929

3030
<div

tailwind.config.js

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,46 @@
11
const defaultTheme = require("tailwindcss/defaultTheme")
22

3+
function trimWhitespace(str) {
4+
return str.split(/\s+/).join(" ").trim()
5+
}
6+
37
module.exports = {
48
purge: [
59
"./public/**/*.html",
610
"./src/**/*.js",
711
],
812
theme: {
913
extend: {
10-
// https://tailwindcss.com/docs/font-family
14+
boxShadow: {
15+
"hero-sm": trimWhitespace(`
16+
0 0 0 1px rgba(0, 0, 0, 0.05),
17+
0 1px 2px 0 rgba(0, 0, 0, 0.05)
18+
`),
19+
"hero": trimWhitespace(`
20+
0 0 0 1px rgba(0, 0, 0, 0.05),
21+
0 1px 3px 0 rgba(0, 0, 0, 0.1),
22+
0 1px 2px 0 rgba(0, 0, 0, 0.06)
23+
`),
24+
"hero-md": trimWhitespace(`
25+
0 0 0 1px rgba(0, 0, 0, 0.05),
26+
0 4px 6px -1px rgba(0, 0, 0, 0.1),
27+
0 2px 4px -1px rgba(0, 0, 0, 0.06)
28+
`),
29+
"hero-lg": trimWhitespace(`
30+
0 0 0 1px rgba(0, 0, 0, 0.05),
31+
0 10px 15px -3px rgba(0, 0, 0, 0.1),
32+
0 4px 6px -2px rgba(0, 0, 0, 0.05)
33+
`),
34+
"hero-xl": trimWhitespace(`
35+
0 0 0 1px rgba(0, 0, 0, 0.05),
36+
0 20px 25px -5px rgba(0, 0, 0, 0.1),
37+
0 10px 10px -5px rgba(0, 0, 0, 0.04)
38+
`),
39+
"hero-2xl": trimWhitespace(`
40+
0 0 0 1px rgba(0, 0, 0, 0.05),
41+
0 25px 50px -12px rgba(0, 0, 0, 0.25)
42+
`),
43+
},
1144
fontFamily: {
1245
sans: [
1346
...defaultTheme.fontFamily.sans.slice(0, 3),
@@ -18,7 +51,6 @@ module.exports = {
1851
},
1952
},
2053
variants: {
21-
// https://github.com/tailwindlabs/tailwindcss-typography/issues/46
2254
typography: [],
2355
},
2456
plugins: [

0 commit comments

Comments
 (0)