1.0.24 • Published 3 years ago
tf-components-abc v1.0.24
Components
Install
npm install tf-components-abcUpdate to newest version
npm update tf-components-abcUsage
Almost every component consists of 2 files: js and css. You have to import
them both. It is up to you to decide how to handle css in your project.
Example 1
If you use a bundler, such as Webpack, your project is likely already setup
for importing css files directly in your javascript. In this case you can do:
Example 1.a
import Button from 'tf-components-abc/components/Button/Button.js';
import 'tf-components-abc/components/Button/style.css';Or, you can import it with one line. This is just a shortcut for the above (under the hood it has the same two lines):
Example 1.b
import Button from 'tf-components-abc/components/Button';Example 2
If you don't have bundler setup for the above, then you can
include css directly in your html:
html:
<link rel="stylesheet" href="node_modules/tf-components-abc/components/Button/style.css">javascript:
import Button from 'tf-components-abc/components/Button/Button.js';The above examples use the latest version of a component. You can choose to use a specific version:
import Button from 'tf-components-abc/v1.0.13/components/Button';