diff --git a/apps/summon-safe/src/components/Toggle.tsx b/apps/summon-safe/src/components/Toggle.tsx index 4507b1c0..3efd882b 100644 --- a/apps/summon-safe/src/components/Toggle.tsx +++ b/apps/summon-safe/src/components/Toggle.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import styled from 'styled-components'; import { Control, Controller } from 'react-hook-form'; import { Switch, Text } from '@gnosis.pm/safe-react-components'; @@ -8,11 +9,18 @@ interface ToggleProps { required?: boolean; disabled?: boolean; shouldUnregister: boolean; + switchLabel?: string; control: Control; } +const Container = styled.div` + display: flex; + flex-direction: row; + align-items: center; +`; + const Toggle: React.FC = (props: ToggleProps) => { - const { id, label, required, control, shouldUnregister } = props; + const { id, label, required, control, shouldUnregister, switchLabel } = props; return ( = (props: ToggleProps) => { render={({ field }) => ( <> {`${label}${required ? ' (*)' : ''}`} - + + + {switchLabel && ( + {`${ + field.value === false ? 'Not ' : '' + }${switchLabel}`} + )} + )} /> diff --git a/apps/summon-safe/src/views/SummonForm.tsx b/apps/summon-safe/src/views/SummonForm.tsx index 0b05f416..66a96d5d 100644 --- a/apps/summon-safe/src/views/SummonForm.tsx +++ b/apps/summon-safe/src/views/SummonForm.tsx @@ -260,6 +260,7 @@ const SummonForm: React.FC = (props: SummonFormProps) => { required control={methods.control} shouldUnregister={false} + switchLabel="Transferrable" /> @@ -269,6 +270,7 @@ const SummonForm: React.FC = (props: SummonFormProps) => { required control={methods.control} shouldUnregister={false} + switchLabel="Transferrable" /> @@ -382,27 +384,27 @@ const SummonForm: React.FC = (props: SummonFormProps) => { - Starting Shamans + Starting Members - Shamans are powerful and have control over key components of the - DAO. Use caution in the spirit world. + You must have at least one member to summon. Add other summoning + members as desired. Members can be added later through a proposal. = (props: SummonFormProps) => { - Starting Members + Starting Shamans - You must have at least one member to summon. Add other summoning - members as desired. Members can be added later through a proposal. + Shamans are powerful and have control over key components of the + DAO. Use caution in the spirit world.