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

react svg use #74

Open
nonocast opened this issue Feb 22, 2020 · 0 comments
Open

react svg use #74

nonocast opened this issue Feb 22, 2020 · 0 comments

Comments

@nonocast
Copy link
Owner

import React from 'react';
import logo from './logo.svg';
import './App.css';

function App() {
  let buzy = { fill: 'blue' };

  return (
    <div className="App">
      <svg width={500} height={300} style={{ background: '#efefef' }}>
        <defs>
          <circle id='port' r={30} />
        </defs>
        <use x={100} y={100} fill={'yellow'} href={'#port'} />
        <use x={200} y={100} fill={'purple'} href={'#port'} />
        <use x={300} y={100} style={buzy} href={'#port'} />
      </svg>
    </div>
  );
}

export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant