-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #429 from HausDAO/feat/update-summon-safe-app
Add modules market to summon-safe app
- Loading branch information
Showing
15 changed files
with
1,676 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React, { useState } from 'react'; | ||
import styled from 'styled-components'; | ||
import { Switch, Text } from '@gnosis.pm/safe-react-components'; | ||
|
||
interface SwitchTextProps { | ||
label: string; | ||
disabled?: boolean; | ||
onChange: (checked: boolean) => void; | ||
} | ||
|
||
const Container = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
`; | ||
|
||
const SwitchText: React.FC<SwitchTextProps> = (props: SwitchTextProps) => { | ||
const { label, onChange } = props; | ||
const [isChecked, toggleSwitch] = useState(false); | ||
|
||
return ( | ||
<Container> | ||
<Text size="lg">{`${label}`}</Text> | ||
<Switch | ||
checked={isChecked} | ||
onChange={() => { | ||
onChange(!isChecked); | ||
toggleSwitch(!isChecked); | ||
}} | ||
/> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default SwitchText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.