1- // SPDX-FileCopyrightText: 2020-2022 The Manyverse Authors
1+ // SPDX-FileCopyrightText: 2020-2023 The Manyverse Authors
22//
33// SPDX-License-Identifier: MPL-2.0
44
@@ -8,32 +8,30 @@ import {Palette} from '~frontend/global-styles/palette';
88import { Dimensions } from '~frontend/global-styles/dimens' ;
99import { t } from '~frontend/drivers/localization' ;
1010import { Images } from '~frontend/global-styles/images' ;
11- import { FabProps } from '../fab ' ;
11+ import { Props as FabProps } from '~frontend/components/FloatingActionButton ' ;
1212import { FAB_VERTICAL_DISTANCE_TO_EDGE } from '../styles' ;
1313
1414export default function floatingAction (
1515 state$ : Stream < State > ,
1616) : Stream < FabProps > {
17- return state$ . map ( ( state ) => ( {
18- sel : 'fab' ,
19- color : Palette . backgroundCTA ,
20- visible : ! ! state . getPrivateFeedReadable ,
21- actions : [
22- {
23- color : Palette . backgroundCTA ,
24- name : 'recipients-input' ,
25- icon : Images . messagePlus ,
26- text : t ( 'private.floating_action_button.compose' ) ,
17+ return state$ . map (
18+ ( state ) : FabProps => ( {
19+ sel : 'fab' ,
20+ color : Palette . backgroundCTA ,
21+ visible : ! ! state . getPrivateFeedReadable ,
22+ actions : [
23+ {
24+ color : Palette . backgroundCTA ,
25+ name : 'recipients-input' ,
26+ icon : Images . messagePlus ,
27+ text : t ( 'private.floating_action_button.compose' ) ,
28+ } ,
29+ ] ,
30+ title : t ( 'private.floating_action_button.compose' ) ,
31+ distanceToEdge : {
32+ vertical : FAB_VERTICAL_DISTANCE_TO_EDGE ,
33+ horizontal : Dimensions . horizontalSpaceBig ,
2734 } ,
28- ] ,
29- title : t ( 'private.floating_action_button.compose' ) ,
30- overrideWithAction : true ,
31- iconHeight : 24 ,
32- iconWidth : 24 ,
33- overlayColor : Palette . transparencyDark ,
34- distanceToEdge : {
35- vertical : FAB_VERTICAL_DISTANCE_TO_EDGE ,
36- horizontal : Dimensions . horizontalSpaceBig ,
37- } ,
38- } ) ) ;
35+ } ) ,
36+ ) ;
3937}
0 commit comments