diff --git a/src/components/results/BinaryString.tsx b/src/components/results/BinaryString.tsx index 3826a68..644c873 100644 --- a/src/components/results/BinaryString.tsx +++ b/src/components/results/BinaryString.tsx @@ -5,18 +5,19 @@ export type BinaryStringViewProps = { binaryString: string; onFlipBit?: (input: FlipBitEventArg) => void; emphasizeBytes: boolean; + className?:string }; export type FlipBitEventArg = { index: number; binaryString: string; $event: any; - newBinaryString: string + newBinaryString: string, }; export default class BinaryStringView extends React.Component { render() { - return {this.getChildren()} + return {this.getChildren()} } onBitClick(index: number, e : any) { diff --git a/src/components/results/IpAddressView.tsx b/src/components/results/IpAddressView.tsx index 5185980..7b5f109 100644 --- a/src/components/results/IpAddressView.tsx +++ b/src/components/results/IpAddressView.tsx @@ -21,9 +21,12 @@ export class IpAddressView extends React.Component return {this.props.ipAddresses.map((ip, i) => - + )} @@ -61,7 +64,8 @@ export class IpAddressView extends React.Component binaryString={fmt(value)} key={octetNumber} emphasizeBytes={false} - allowFlipBits={true} + allowFlipBits={true} + className={`octet-${octetNumber}`} onFlipBit={e => this.onFlippedBit(e.newBinaryString, octetNumber, ip)} />; }
{ip.toString()}{ip.toString()} - {this.bin(ip.firstByte, 1, ip)}.{this.bin(ip.secondByte, 2, ip)}.{this.bin(ip.thirdByte, 3, ip)}.{this.bin(ip.fourthByte, 4, ip)} + {this.bin(ip.firstByte, 1, ip)}. + {this.bin(ip.secondByte, 2, ip)}. + {this.bin(ip.thirdByte, 3, ip)}. + {this.bin(ip.fourthByte, 4, ip)}