Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make LightningSvg and OnChainSvg components dynamic with width and height props #1838

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/images/SVG/DynamicSVG/LightningSvg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from 'react';
import { Svg, Circle, Polygon } from 'react-native-svg';
import { themeColor } from '../../../../utils/ThemeUtils';

export default function LightningSvg() {
export default function LightningSvg({ width = 70, height = 70 }) {
const svgProps = {
width: '70',
height: '70',
width: `${width}`,
height: `${height}`,
viewBox: '0 0 50 50',
fill: 'none',
xmlns: 'http://www.w3.org/2000/svg'
Expand Down
6 changes: 3 additions & 3 deletions assets/images/SVG/DynamicSVG/OnChainSvg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from 'react';
import { Svg, Circle, Path } from 'react-native-svg';
import { themeColor } from '../../../../utils/ThemeUtils';

export default function OnChainSvg() {
export default function OnChainSvg({ width = 70, height = 70 }) {
const svgProps = {
width: '70',
height: '70',
width: `${width}`,
height: `${height}`,
viewBox: '0 0 50 50',
fill: 'none',
xmlns: 'http://www.w3.org/2000/svg'
Expand Down
4 changes: 2 additions & 2 deletions views/Receive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ export default class Receive extends React.Component<

const lightningButton = () => (
<React.Fragment>
<LightningSvg />
<LightningSvg width={50} height={50} />
<Text
style={{
color:
Expand All @@ -1035,7 +1035,7 @@ export default class Receive extends React.Component<

const onChainButton = () => (
<React.Fragment>
<OnChainSvg />
<OnChainSvg width={50} height={50} />
<Text
style={{
color:
Expand Down