Skip to content

Commit

Permalink
Merge pull request #1838 from myxmaster/flexible_size_for_lightningsv…
Browse files Browse the repository at this point in the history
…g_and_onchainsvg

Make LightningSvg and OnChainSvg components dynamic with width and height props
  • Loading branch information
kaloudis authored Nov 12, 2023
2 parents 0165f32 + a14fc6a commit e1b9182
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
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

0 comments on commit e1b9182

Please sign in to comment.