File tree Expand file tree Collapse file tree 3 files changed +20
-30
lines changed Expand file tree Collapse file tree 3 files changed +20
-30
lines changed Original file line number Diff line number Diff line change 1
- import { useAtomValue } from "jotai" ;
2
1
import { DownloadIcon } from "lucide-react" ;
3
2
import Canvas from "./Canvas" ;
4
3
import Controls from "./Controls" ;
5
- import Expand from "./Expand" ;
6
- import { imageAtom } from "./atoms" ;
7
4
8
5
export default function App ( ) {
9
- const image = useAtomValue ( imageAtom ) ;
10
-
11
6
return (
12
7
< main className = "container mx-auto max-w-md p-4 pt-6 flex flex-col gap-4 select-none" >
13
8
< header >
@@ -17,15 +12,13 @@ export default function App() {
17
12
< Controls />
18
13
< Canvas />
19
14
20
- < Expand expanded = { image != null } >
21
- < div className = "flex gap-2" >
22
- < DownloadIcon />
23
- < span >
24
- < b className = "font-semibold" > To save:</ b > Touch and hold >
25
- Save to Photos
26
- </ span >
27
- </ div >
28
- </ Expand >
15
+ < div className = "flex gap-2" >
16
+ < DownloadIcon />
17
+ < span >
18
+ < b className = "font-semibold" > To save:</ b > Touch and hold >
19
+ Save to Photos
20
+ </ span >
21
+ </ div >
29
22
30
23
< footer className = "mt-auto text-sm text-slate-500 dark:text-slate-400 flex justify-between" >
31
24
< div >
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export default function CustomControls() {
86
86
value = { color }
87
87
onChange = { ( e ) => setColor ( e . target . value ) }
88
88
aria-label = "Color"
89
- className = "block w-8 h-8"
89
+ className = "input shrink-0 w-8 h-8 box-content "
90
90
/>
91
91
</ div >
92
92
Original file line number Diff line number Diff line change 36
36
37
37
@utility input-base {
38
38
@apply rounded-lg;
39
- @apply block min-w-0 w-full grow py-1 pr-3 pl-1 ;
39
+ @apply block min-w-0 w-full grow py-1 px-3 ;
40
40
@apply caret-primary-500;
41
41
@apply font-normal text-right;
42
42
@apply bg-white dark:bg-slate-950;
43
43
@apply inset-shadow-xs;
44
44
@apply border-1 border-slate-300;
45
45
@apply dark:border-1 dark:border-slate-700;
46
46
47
- @apply focus:outline-offset-0;
48
47
@apply focus:border-1 focus:border-primary-500;
48
+ @apply focus:outline-3 focus:outline-offset-0 focus:outline-primary-500/30 dark:focus:outline-primary-400/50;
49
49
}
50
50
51
51
@utility recessed {
120
120
@apply font-medium;
121
121
}
122
122
123
- /* input[type="color" i] {
124
- @apply input-base;
125
- @apply p-0;
126
- } */
123
+ input [type = "color" i] {
124
+ @apply p-0 overflow-hidden;
127
125
128
- input [ type = "color" i] ::-webkit-color-swatch-wrapper ,
129
- input [ type = "color" i] ::-moz-color-swatch-wrapper {
130
- @apply p-0;
131
- }
126
+ & ::-webkit-color-swatch-wrapper ,
127
+ & ::-moz-color-swatch-wrapper {
128
+ @apply p-0;
129
+ }
132
130
133
- input [type = "color" i]::-webkit-color-swatch ,
134
- input [type = "color" i]::-moz-color-swatch {
135
- @apply rounded-lg aspect-square;
136
- @apply border-0;
137
- @apply inset-ring-1 inset-ring-slate-400/50;
131
+ & ::-webkit-color-swatch ,
132
+ & ::-moz-color-swatch {
133
+ @apply border-0;
134
+ }
138
135
}
139
136
140
137
.input {
You can’t perform that action at this time.
0 commit comments