File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed
packages/common/src/components/Preview/Navigator Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export const Icons = styled.div`
1818 display: flex;
1919` ;
2020
21- export const Icon = styled . button < { moduleView ?: boolean } > `
21+ export const Icon = styled . button < { moduleView ?: boolean ; disabled ?: boolean } > `
2222 display: inline-block;
2323 border: none;
2424 background-color: transparent;
@@ -31,14 +31,24 @@ export const Icon = styled.button<{ moduleView?: boolean }>`
3131 outline: none;
3232 cursor: pointer;
3333
34- ${ ( { moduleView, theme } ) =>
34+ svg path,
35+ svg rect {
36+ transition: 0.2s ease fill;
37+ }
38+
39+ ${ ( { moduleView, disabled, theme } ) =>
3540 ! moduleView &&
36- css `
37- &:hover svg path,
38- &:hover svg rect {
39- fill: ${ theme . light ? 'black' : 'white' } ;
40- }
41- ` }
41+ ( disabled
42+ ? css `
43+ cursor: default;
44+ opacity: 0.6;
45+ `
46+ : css `
47+ &:hover svg path,
48+ &:hover svg rect {
49+ fill: ${ theme . light ? 'black' : 'white' } ;
50+ }
51+ ` ) }
4252
4353 /* // TODO: Replace with new theme */
4454${ ( { moduleView, theme } ) =>
You can’t perform that action at this time.
0 commit comments