@rango-dev/ui 0.1.10-next.80 → 0.1.10-next.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Settings/Settings.d.ts +2 -0
- package/dist/ui.cjs.development.js +13 -1
- package/dist/ui.cjs.development.js.map +1 -1
- package/dist/ui.cjs.production.min.js +1 -1
- package/dist/ui.cjs.production.min.js.map +1 -1
- package/dist/ui.esm.js +13 -1
- package/dist/ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Settings/Settings.tsx +14 -0
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import { Chip } from '../Chip';
|
|
|
7
7
|
import { LiquiditySource } from '../../types/meta';
|
|
8
8
|
import { TextField } from '../TextField';
|
|
9
9
|
import { Radio } from '../Radio';
|
|
10
|
+
import { Switch } from '../Switch';
|
|
10
11
|
|
|
11
12
|
const BaseContainer = styled('div', {
|
|
12
13
|
borderRadius: '$5',
|
|
@@ -28,6 +29,11 @@ const LiquiditySourceContainer = styled(BaseContainer, {
|
|
|
28
29
|
marginTop: '$32',
|
|
29
30
|
cursor: 'pointer',
|
|
30
31
|
});
|
|
32
|
+
const InfiniteContainer = styled(BaseContainer, {
|
|
33
|
+
display: 'flex',
|
|
34
|
+
justifyContent: 'space-between',
|
|
35
|
+
marginTop: '$32',
|
|
36
|
+
});
|
|
31
37
|
|
|
32
38
|
const StyledAngleRight = styled(AngleRightIcon, { marginLeft: '$8' });
|
|
33
39
|
|
|
@@ -57,6 +63,8 @@ export interface PropTypes {
|
|
|
57
63
|
selectedTheme: Theme;
|
|
58
64
|
onThemeChange: (theme: Theme) => void;
|
|
59
65
|
onBack: () => void;
|
|
66
|
+
infiniteApprove: boolean;
|
|
67
|
+
toggleInfiniteApprove: (infinite: boolean) => void;
|
|
60
68
|
}
|
|
61
69
|
|
|
62
70
|
export function Settings(props: PropTypes) {
|
|
@@ -73,6 +81,8 @@ export function Settings(props: PropTypes) {
|
|
|
73
81
|
minSlippage,
|
|
74
82
|
selectedTheme,
|
|
75
83
|
onThemeChange,
|
|
84
|
+
toggleInfiniteApprove,
|
|
85
|
+
infiniteApprove,
|
|
76
86
|
} = props;
|
|
77
87
|
|
|
78
88
|
const [selectedSlippage, setSelectedSlippage] = useState(
|
|
@@ -141,6 +151,10 @@ export function Settings(props: PropTypes) {
|
|
|
141
151
|
style={{ marginTop: '$24' }}
|
|
142
152
|
/>
|
|
143
153
|
</ThemesContainer>
|
|
154
|
+
<InfiniteContainer>
|
|
155
|
+
<Typography variant="body1">Infinite Approval</Typography>
|
|
156
|
+
<Switch checked={infiniteApprove} onChange={toggleInfiniteApprove} />
|
|
157
|
+
</InfiniteContainer>
|
|
144
158
|
<LiquiditySourceContainer onClick={onLiquiditySourcesClick}>
|
|
145
159
|
<Typography variant="body1">Liquidity Sources</Typography>
|
|
146
160
|
<LiquiditySourceNumber>
|