Skip to content

Commit

Permalink
fix(app): set shadow none not working (#425)
Browse files Browse the repository at this point in the history
* fix(app): fix set shadow none
* docs(changeset): fix: fix set shadow none value
  • Loading branch information
riccardoperra authored Dec 17, 2022
1 parent cae526e commit ca74f97
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-mugs-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@codeimage/app': patch
---

fix: fix set shadow none value
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {useI18n} from '@codeimage/locale';
import {getTerminalState} from '@codeimage/store/editor/terminal';
import {Box, Group, RadioBlock, SegmentedField, Select} from '@codeimage/ui';
import {shadowsLabel, TERMINAL_SHADOWS} from '@core/configuration/shadow';
import {shadowsLabel} from '@core/configuration/shadow';
import {AVAILABLE_TERMINAL_THEMES} from '@core/configuration/terminal-themes';
import {useModality} from '@core/hooks/isMobile';
import {SkeletonLine} from '@ui/Skeleton/Skeleton';
Expand Down Expand Up @@ -154,8 +154,8 @@ export const WindowStyleForm: ParentComponent = () => {
value={terminal.state.shadow}
multiple={false}
onSelectChange={value => {
const shadowSelected = value ?? TERMINAL_SHADOWS.bottom;
umami.trackEvent(shadowSelected, 'change-shadow');
const shadowSelected = value;
umami.trackEvent(shadowSelected ?? 'none', 'change-shadow');
terminal.setShadow(shadowSelected);
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion apps/codeimage/src/state/editor/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function createTerminalState() {
return {...state, ...persistedState};
});
},
setShadow: (shadow: string) => setState('shadow', shadow),
setShadow: (shadow: string | null) => setState('shadow', shadow),
setType: (type: string) => setState('type', type),
setAccentVisible: (accentVisible: boolean) =>
setState('accentVisible', accentVisible),
Expand Down

0 comments on commit ca74f97

Please sign in to comment.