-
Notifications
You must be signed in to change notification settings - Fork 31
Components modification for new TXs tab. #37
Changes from all commits
2bb1736
d2d598e
bda7d52
522f294
8bcc943
30622e5
80d841d
fdc6875
3217318
5ff0268
c86d0d2
d98efcc
a3a1d6b
f396ff5
9cabc30
adb8394
a090eab
6bef5f2
78d4c76
e418356
81f1d2f
bd6f162
b37f7ed
57c3187
5212fa6
3c44322
5ec4221
2810382
5e520e7
a2e112a
49c5361
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,22 @@ | ||
| { | ||
| "parser": "@typescript-eslint/parser", | ||
| "extends": [ | ||
| "react-app", | ||
| "prettier", | ||
| "prettier/react", | ||
| "plugin:import/errors", | ||
| "plugin:@typescript-eslint/recommended" | ||
| "plugin:react/recommended", | ||
| "plugin:@typescript-eslint/recommended", | ||
| "prettier/@typescript-eslint", | ||
| "plugin:prettier/recommended" | ||
| ], | ||
| "plugins": ["prettier", "import"] | ||
| "plugins": ["react-hooks"], | ||
| "parserOptions": { | ||
| "ecmaVersion": 2018, | ||
| "sourceType": "module", | ||
| "ecmaFeatures": { | ||
| "jsx": true | ||
| } | ||
| }, | ||
| "rules": { | ||
| "react-hooks/rules-of-hooks": "error", | ||
| "react-hooks/exhaustive-deps": "warn", | ||
| "react/prop-types": "off" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,17 @@ | ||
| import React from 'react'; | ||
| import styled from 'styled-components'; | ||
|
|
||
| const Divider = styled.div` | ||
| const StyledDivider = styled.div` | ||
| border-top: 2px solid ${({ theme }) => theme.colors.separator}; | ||
| margin: 16px 0; | ||
| `; | ||
|
|
||
| export default ({ ...args }) => <Divider {...args} />; | ||
| type Props = { | ||
| className?: string; | ||
| }; | ||
|
|
||
| const Divider = ({ className }: Props): React.ReactElement => ( | ||
| <StyledDivider className={className} /> | ||
| ); | ||
|
|
||
| export default Divider; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,15 +8,15 @@ export default { | |
| parameters: { | ||
| componentSubtitle: `It shows a Dialog, with a modal look and feels, but only being | ||
| rendered inside a container instead of taking position absolute. | ||
| ` | ||
| } | ||
| `, | ||
| }, | ||
| }; | ||
|
|
||
| export const fixedDialog = () => ( | ||
| export const SimpleFixedDialog = (): React.ReactElement => ( | ||
| <FixedDialog | ||
| title="Legal Disclaimer" | ||
| body={<div>Some Body</div>} | ||
| onCancel={() => {}} | ||
| onConfirm={() => {}} | ||
| onCancel={() => undefined} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could've used console.log
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we use
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is a story |
||
| onConfirm={() => undefined} | ||
| /> | ||
| ); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,18 @@ | ||
| import React from 'react'; | ||
| import styled from 'styled-components'; | ||
|
|
||
| import FixedIcon from './index'; | ||
| import FixedIcon, { IconTypes } from './index'; | ||
|
|
||
| export default { | ||
| title: 'Data Display/FixedIcon', | ||
| component: FixedIcon, | ||
| parameters: { | ||
| componentSubtitle: `Components that renders an icon customized for Safe Multisig app, this icon is not | ||
| customizable by props. If you need generic purposes Icons, try Icon component.` | ||
| } | ||
| customizable by props. If you need generic purposes Icons, try Icon component.`, | ||
| }, | ||
| }; | ||
|
|
||
| export const icons = () => { | ||
| export const Icons = (): React.ReactElement => { | ||
| const Wrapper = styled.div` | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
|
|
@@ -32,29 +32,29 @@ export const icons = () => { | |
| font-size: 14px; | ||
| `; | ||
|
|
||
| const icons: IconTypes[] = [ | ||
| 'arrowSort', | ||
| 'connectedRinkeby', | ||
| 'connectedWallet', | ||
| 'bullit', | ||
| 'dropdownArrowSmall', | ||
| 'arrowReceived', | ||
| 'arrowSent', | ||
| 'threeDots', | ||
| 'options', | ||
| 'plus', | ||
| 'chevronRight', | ||
| 'chevronLeft', | ||
| 'chevronUp', | ||
| 'chevronDown', | ||
| 'settingsChange', | ||
| 'creatingInProgress', | ||
| 'notOwner', | ||
| ]; | ||
|
|
||
| return ( | ||
| <Wrapper> | ||
| {[ | ||
| 'arrowSort', | ||
| 'connectedRinkeby', | ||
| 'connectedWallet', | ||
| 'bullit', | ||
| 'dropdownArrowSmall', | ||
| 'arrowReceived', | ||
| 'arrowSent', | ||
| 'threeDots', | ||
| 'options', | ||
| 'plus', | ||
| 'chevronRight', | ||
| 'chevronLeft', | ||
| 'chevronUp', | ||
| 'chevronDown', | ||
| 'settingsChange', | ||
| 'creatingInProgress', | ||
| 'notOwner' | ||
|
|
||
|
|
||
| ].map((type: any, index) => ( | ||
| {icons.map((type, index) => ( | ||
| <IconBox key={index}> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could've used type as a key. This makes no different in this case, but just fyi
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure to understand? could you give me an example?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ohh yes! I was thinking about something with TS. |
||
| <FixedIcon type={type} /> | ||
| {type} | ||
|
|
@@ -63,4 +63,3 @@ export const icons = () => { | |
| </Wrapper> | ||
| ); | ||
| }; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| import React from 'react'; | ||
|
|
||
| const icon = ( | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="10" | ||
| height="10" | ||
| viewBox="0 0 10 10"> | ||
| <path | ||
| fill="#008C73" | ||
| fillRule="evenodd" | ||
| d="M3.431 7.99h2.6c.554 0 1.004.45 1.004 1.005C7.035 9.55 6.585 10 6.03 10H1.005c-.277 0-.529-.112-.71-.294C.111 9.524 0 9.272 0 8.995V3.97c0-.555.45-1.005 1.005-1.005.555 0 1.005.45 1.005 1.005v2.599L8.284.294c.393-.392 1.03-.392 1.422 0 .392.393.392 1.03 0 1.422L3.43 7.99z" | ||
| /> | ||
| </svg> | ||
| ) | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="10" | ||
| height="10" | ||
| viewBox="0 0 10 10"> | ||
| <path | ||
| fill="#008C73" | ||
| fillRule="evenodd" | ||
| d="M3.431 7.99h2.6c.554 0 1.004.45 1.004 1.005C7.035 9.55 6.585 10 6.03 10H1.005c-.277 0-.529-.112-.71-.294C.111 9.524 0 9.272 0 8.995V3.97c0-.555.45-1.005 1.005-1.005.555 0 1.005.45 1.005 1.005v2.599L8.284.294c.393-.392 1.03-.392 1.422 0 .392.393.392 1.03 0 1.422L3.43 7.99z" | ||
| /> | ||
| </svg> | ||
| ); | ||
|
|
||
| export default icon; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| import React from 'react'; | ||
|
|
||
| const icon = ( | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="10" | ||
| height="10" | ||
| viewBox="0 0 10 10"> | ||
| <path | ||
| fill="#F02525" | ||
| fillRule="evenodd" | ||
| d="M6.569 2.01h-2.6c-.554 0-1.004-.45-1.004-1.005C2.965.45 3.415 0 3.97 0h5.025c.277 0 .529.112.71.294.183.182.295.434.295.711V6.03c0 .555-.45 1.005-1.005 1.005-.555 0-1.005-.45-1.005-1.005V3.431L1.716 9.706c-.393.392-1.03.392-1.422 0-.392-.393-.392-1.03 0-1.422L6.57 2.01z" | ||
| /> | ||
| </svg> | ||
| ) | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="10" | ||
| height="10" | ||
| viewBox="0 0 10 10"> | ||
| <path | ||
| fill="#F02525" | ||
| fillRule="evenodd" | ||
| d="M6.569 2.01h-2.6c-.554 0-1.004-.45-1.004-1.005C2.965.45 3.415 0 3.97 0h5.025c.277 0 .529.112.71.294.183.182.295.434.295.711V6.03c0 .555-.45 1.005-1.005 1.005-.555 0-1.005-.45-1.005-1.005V3.431L1.716 9.706c-.393.392-1.03.392-1.422 0-.392-.393-.392-1.03 0-1.422L6.57 2.01z" | ||
| /> | ||
| </svg> | ||
| ); | ||
|
|
||
| export default icon; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| import React from 'react'; | ||
|
|
||
| const icon = ( | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="8" | ||
| height="8" | ||
| viewBox="0 0 8 8"> | ||
| <path | ||
| fill="#5D6D74" | ||
| fillRule="evenodd" | ||
| d="M4.984 4.608l1.302-1.322c.384-.384 1.024-.384 1.408 0 .384.384.384 1.024 0 1.408L4.728 7.702C4.537 7.893 4.28 8 4.024 8c-.256 0-.511-.107-.704-.298L.29 4.694c-.426-.427-.383-1.152.13-1.515.404-.298.98-.213 1.322.15l1.13 1.108.129.022V.982C3 .427 3.447 0 3.98 0c.577 0 1.004.448 1.004.982v3.626z" | ||
| /> | ||
| </svg> | ||
| ) | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="8" | ||
| height="8" | ||
| viewBox="0 0 8 8"> | ||
| <path | ||
| fill="#5D6D74" | ||
| fillRule="evenodd" | ||
| d="M4.984 4.608l1.302-1.322c.384-.384 1.024-.384 1.408 0 .384.384.384 1.024 0 1.408L4.728 7.702C4.537 7.893 4.28 8 4.024 8c-.256 0-.511-.107-.704-.298L.29 4.694c-.426-.427-.383-1.152.13-1.515.404-.298.98-.213 1.322.15l1.13 1.108.129.022V.982C3 .427 3.447 0 3.98 0c.577 0 1.004.448 1.004.982v3.626z" | ||
| /> | ||
| </svg> | ||
| ); | ||
|
|
||
| export default icon; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| import React from 'react'; | ||
|
|
||
| const icon = ( | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="6" | ||
| height="6" | ||
| viewBox="0 0 6 6"> | ||
| <path | ||
| fill="#008C73" | ||
| fillRule="evenodd" | ||
| d="M3 0C1.347 0 0 1.347 0 3s1.347 3 3 3 3-1.347 3-3-1.347-3-3-3z" | ||
| /> | ||
| </svg> | ||
| ) | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="6" | ||
| height="6" | ||
| viewBox="0 0 6 6"> | ||
| <path | ||
| fill="#008C73" | ||
| fillRule="evenodd" | ||
| d="M3 0C1.347 0 0 1.347 0 3s1.347 3 3 3 3-1.347 3-3-1.347-3-3-3z" | ||
| /> | ||
| </svg> | ||
| ); | ||
|
|
||
| export default icon; |
Uh oh!
There was an error while loading. Please reload this page.