Files
ui/packages/react-identicon/src/beachball/svg/element.ts
T
Jaco Greeff c3f57c19e8 Move ui-identicon -> react-identicon (#165)
* Move ui-identicon -> react-identicon

* ui-identicon import fix

* Update README package links

* Update doc sidebar links

* Adjust react-qr signatures, CHANGELOG
2019-07-29 11:30:37 +02:00

18 lines
599 B
TypeScript

// Copyright 2016 Dan Finlay
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import createSvg from './svg';
export default function element (size: number, type: string = 'svg', x: number = 0, y: number = 0): Element {
const elem = createSvg(type);
elem.setAttributeNS('', 'x', `${x}`);
elem.setAttributeNS('', 'y', `${y}`);
elem.setAttributeNS('', 'width', `${size}`);
elem.setAttributeNS('', 'height', `${size}`);
return elem;
}